The population cap affects how many soldiers you can have, but which buildings (other than the standard residence and noble residence) increase it?
I did some digging on my own, and eventually found out the following:
Your Mayor's House gives you a small amount of population capacity (the starting cap), but you don't get more by upgrading it.
Gingerbread Houses (a reward from the 2015 Christmas event) have 150% of the capacity of a Noble Residence, and similarly scaled upgrade costs.
A Pirate residence gives +50 pop cap, but cannot be upgraded.
A White Castle (sometimes a reward for completing the adventure Stealing from the Rich) gives +50 pop cap and also cannot be upgraded.
A Dark Castle gives +100 population cap and can't be upgraded. It's a very rare reward for the adventure The Black Knights.
A Witch Tower gives +100 population cap and can't be upgraded. It is a possible reward from the adventures The Dark Brotherhood and Roaring Bull.
A Frozen Manor gives +140 pop cap (the most of any one building) and also can't be upgraded. It is only available from the Master Architect Mystery Chest.
Floating Residences act as Noble Residences, except they have +10 population capacity (they can be upgraded, and will always have 10 more population than an equivalent level Noble Residence) which gives them 40-80 pop cap boost, depending on level. They can only be built over water, which saves space on your island. They can be bought for 290 gems each (200 more than a Noble Residence deed) from the Architect in the Merchant Chest.