DRYs up subnets code

Cleans up some of the create_subnets code through use of helper methods,
and modifies the tests slightly based on the change in database model
creation.