LP: #1880495 - Use get_or_create() in migration step
The function get_default_domain() sets the ttl which during the migration
step 0011 is not present in the database yet. This patch uses get_or_create()
instead to get the 'maas' domain object with the same defaults that
get_default_domain() uses.
Backport of d0653c9 LP: #1870171 - Remove the token column from the Node table.
The token column is only used by the API when allocating and machine and
listing allocated machines. When a User Token is deleted this association
causes the Node to be deleted as well. Allocated machines are already
filtered by owner and status so the token column isn't needed.
In the backport Node.token is no longer used but the column remains to
avoid creating a migration.
LP: #1759091 - Limit the amount of queries used during a list operation.
Handlers can now specify a list_queryset which is used when the client calls
list(). The machine, device, and controller handlers have been updated to
only output data needed for the listing page for that node type. All node
types now have their query count tested for list and get.