Rare County Durham coastal habitat to be restored with nearly £1m funding