Nearly 20,000 complaints were made about rats to Scotland's councils last year, with a growing funding squeeze blamed for rising numbers of sightings.