Sand dunes across England are set for a golden future following £4.3m of funding to protect at-risk habitats.