Apply six for metaclass

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

Change-Id: I1d9909d70bb614c9d1c336d0c492027f5b6b5088
Closes-Bug: #1236648