A sweeping bipartisan housing reform package is on the verge of becoming law after months of deadlock in Congress.