Poole flood defences are to receive more than £12m in funding from the government, which is said to protect 135 homes.