Python3, tests for new features, small fix for __len__ and query copying

Main reason to add six dependency is six.with_metaclass helper, because using metaclasses with both python 2/3 is quite annoying without it.