Developers will be required to install solar panels and heat pumps in all new homes in England.