Apply six for metaclass

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

Change-Id: I9fc7a59df3af29b4cc1287c40fa4e883d994a961
Closes-Bug: #1236648