Deputy Prime Minister and Housing Secretary Angela Rayner has resigned from the government after an investigation into her tax affairs concluded she breached the ministerial code.