Code formatting and naming changes; PEP7

Try to be more in compliance with PEP7, also make some basic type names
shorter. There is precendent for this in other modules shipped with
Python

Change-Id: I5a4147b4f75df9e938d76046b926c53006769462
Reviewed-on: http://review.couchbase.org/26398
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>