The government is snubbing a £25bn renewable energy project which promised to import enough solar and wind power from Morocco to meet nearly a tenth of the UK's electricity demand.