refactor tag_name and add tests for client tag functions

- refactor tag_name to use list of dicts instead of machine objects, so it doesn't need a cloudinstall.MaasState argument

- add unit test suite for some tag-related parts of MaasClient, to help test the refactoring

- separate integration tests and unit tests in directory and makefile so the unit tests don't wait for a timeout to check for a running maas

- update makefile to run pep8 and pyflakes on test suite too, and fix a few complaints there