Tidying code.
Checking if callbacks are functions before executing them.
Removed I/O from library and added some style to test.
Applying html standards to test.
Removed global vars in javascript.
Documented gateway.js
add subscribe and renew, and manage update messages coming for specific addresses.
fetch_block_header and fetch_block_transaction_hashes
add renew and subscribe methods.

Conflicts:
	gateway.py
Merge branch 'methods'

Conflicts:
	gateway.py
Merge branch 'dev'