Add third element to RPC versions for backports

This makes the RPC version support three elements, adding a "revision"
in addition to the major and minor version. The revision would always
be zero for the master branch of a service, but could be incremented
for stable versions. This provides us some room to backport fixes
that affect RPC versions in such a way that would avoid breaking
the version lineage for systems running stable versions that may
some day be involved in a rolling upgrade to a version from master.

I didn't find any tests for version_is_compatible(), so I added
some for existing version scenarios, as well as new ones with
revisions. They also serve to validate that this doesn't break
anything for code using two-element versions (the expectation is that
two-element versions will still be used everywhere until a third
is needed).

Porting chages from Change-Id I239c17a3e305f572493498c4b96ee3c7514c5881
to oslo-incubator

Change-Id: I4fa7b0be14a7afba36136a746b76036355f119b2
Apply six for metaclass

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

Porting Change-Id I9fc7a59df3af29b4cc1287c40fa4e883d994a961
from oslo-incubator

Change-Id: Icdacdcf5556b6d3b8450d1350c6f62b4f5a9690b
Merge "Add third element to RPC versions for backports"