Blackpool is to receive nearly £3m to tackle homelessness in the resort as latest figures show a rise in the number of people without a proper home.