nosetests for Python 3

- Minor code modifications to fix python 3 support
  for the underlying components tested by nose.
- Moderate changes in the tests to provide enough python 3
  support needed to run the !net,!site tests.

Change-Id: I62a71cb786562eb9904a556d8066b6120ed885cf
Merge "nosetests for Python 3"