Coalition government agrees to remove parts of controversial law and allow homes to rely on fossil fuels