More intellignet shutdown

Check every second by 5 seconds then kill if need.
Update stop.sh

Check every 0.1s that daemon is closed, kill it after 5s
Do not destroy context if socket test fails
PEP 8 fixes
Effing indents.
Indentation Fix
Update stop.sh

add usleep
fix raspberry pi arch ZMQError: Address family not supported by protocol
Merge pull request #596 from y12studio/raspberry-pi-arch-fix

fix raspberry pi arch ZMQError: Address family not supported by protocol
Move and refactor transport tests.

* Move transport tests to test folder.
* Refactor tests in unittest format; use mocks.
* Improve code style.
Drop run_tests.sh.

* Unit tests should be run by calling `nosetests` on the project home
  directory.
Improve contact tests.

* Factor guid and uri in setUpClass.
* Test __repr__ is implemented and __str__ derived.
Merge pull request #594 from Renelvon/more_tests

Unit test node/transport.py and expand tests of node/contact.py.
OS-agnostic browser start.

* os.uname doesn't work on Windows.
Simplify protocol specification.
Merge pull request #597 from Renelvon/os_agnostic_browser_open

OS-agnostic browser start.
Merge pull request #566 from Rav3nPL/patch-3

More intellignet shutdown
handle bad database files better and notify user

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
Treat disable_open_browser as a bool.
Package main for ease of use.