Python 3: use six.with_metaclass

Instead of using (Python 2):

    __metaclass__ = ...

or (Pyhon 3):

    class Foo(metaclass=...):

we use six.with_metaclass (Python 2 and 3):

    class Foo(six.with_metaclass(Meta, Base)):

Change-Id: Ie934cd14dfb81a018f838294b768e69dff16af5b
Merge "Python 3: use six.with_metaclass"