Two previously undisclosed agreements between the city’s ostensibly unpaid real estate adviser and a company that acted as its landlord on two major deals reveal not only that he had formal agreements with the company, but that he stood to lose money if the leases he negotiated didn’t go through.