Apply six for metaclass

__metaclass__ cannot be used in python3.
six be used in general for python 3 compatibility.

Change-Id: I5b3a55bd8a43bbc9c75fcc7f005d31c4af102c3f
Merge "Apply six for metaclass"