refactored tests in courseware to draw course info from mongo instead of xmlmodulestore
Refactoring the code in tests.py to remove unnecessary dependencies on the XML Modulestore.
Merge branch 'master' into jnater/playground

Conflicts:
	common/lib/xmodule/xmodule/modulestore/tests/factories.py
	lms/djangoapps/courseware/tests/tests.py
Refactored some of the classes in tests.py to not unnecessarily depend on the XML modulestore.

Conflicts:
	lms/djangoapps/courseware/tests/test_navigation.py
	lms/djangoapps/courseware/tests/test_view_authentication.py
	lms/djangoapps/courseware/tests/tests.py
Removed a unnecessary imports from mongo_login_helpers.py and repeated code from tests.py.
Initialize MakoMiddleware manually during certificate grading runs.

Without this, problems fail to load because they can't find how to
render themselves, and the certificate generation grading run will
get an inaccurately low count of the possible points a user could
get (anything they didn't see will be omitted), inflating their
grade during certificate calculation and making it inconsistent
with their Progress page.
Allow error messages with non-ascii characters to be handled correctly

Also, add a test for this behavior.
Convert many byte strings to unicode; change string formatting
Fix some line lengths to make pylint happy
Fix formatting of docstrings; add more docstrings
Merge pull request #206 from edx/rc/2013-06-18

Rc/2013 06 18
Initial testing for parallelization
move override of MODULESTORE settings into ModuleStore test case class
Added the beginnings of self cleanup
Contentstore singleton is now cleared during teardown
Moved port range to rake file
PR fixes
Addressed pull request feedback.
Cleaned up import and comment
Fixed pylint/pep8 violations