The Department of Housing and Urban Development in the next few weeks will unfurl the most comprehensive rewrite of the rules governing the mortgage-lending process in the last quarter century, including a significant shift in how mortgage brokers conduct their trade.