Add Namespace.__int__ to cast to integer

Format strings use %d and %i for page.namespace(), which is now
a Namespace.  Allow the Namespace to be cast as an int.

Change-Id: Ice3d1fca94f431023f10d2e1999b0b49e0b2cd02