Apply six for metaclass

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

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