In the discretion of the agency, any revenue bonds issued under the provisions of this chapter may be secured by a trust agreement by and between the agency and a corporate trustee or trustees, which may be any trust company or bank having the powers of a trust company within or without this state. Such a trust agreement or the resolution providing for the issuance of revenue bonds may pledge or assign the revenues to be received or proceeds of any contract or contracts pledged, and may convey or mortgage any residence the construction of which is to be financed out of the proceeds of such revenue bonds. Such trust agreement or the resolution providing for the issuance of bonds may provide for the assignment to such corporate trustee or trustees of mortgage or construction loans or loans to qualified mortgage lenders, to be held by such trustee or trustees on behalf of the agency for the benefit of the bondholders. Such trust agreement or resolution providing for the issuance of revenue bonds may contain such provisions for protecting and enforcing the rights and remedies of the bondholders as may be reasonable and proper and not in violation of law, including such provisions as may be included in any resolution or resolutions of the agency authorizing the issuance of the revenue bonds. Any bank or trust company doing business under the laws of this state which may act as depositary of the proceeds of revenue bonds or of revenues or other moneys may furnish such indemnity bonds or pledge such securities as may be required by the agency. Any such trust agreement may set forth the rights and remedies of the bondholders and of the trustee or trustees, and may restrict the individual right of action by bondholders. In addition to the foregoing, any such trust agreement or resolution may contain such other provisions as the agency may deem reasonable and proper for the security of the bondholders. All expenses incurred in carrying out the provisions of such trust agreement or resolution may be treated as a part of the cost of residential construction.