The Greens have capitulated on their demands and will pass Labor’s two stalled housing bills, bringing an end to a lengthy stand-off and setting up a major election battle.