Fixed the test failures on phantomjs and added a configuration option to let the user choose between getting an attachment as text or as a Blob, defaulting to text.
Fixed phantomjs test failures and conformed to c89 all-vars-at-beginning-of-function codestyle.
Merge remote-tracking branch 'cjdelisle/xwiki-phantomjs-test-failures'

Conflicts:
	src/jio.storage/xwikistorage.js
	test/jiotests.js