Added mock objects

Added a few mock classes to make unit testing more painless.
Rewrote P2PNode unit tests

Rewrote P2PNode unit tests to follow new architecture, and added a whole
bunch for previously untested methods.
Fixed a lot of stupid little syntax errors

And I mean a LOT. Only 5/22 unit tests fail now. (Hangs indefinitely at
the end of testing but such is life.)
Added timeout to MockNode

MockNode sockets from incoming connections now have a timeout. Only 4
unit test failures now. Still hangs at end of testing.
More syntax errors plus passOnSearch test fix

Fixed more stupid syntax errors. Also fixed PassOnSearchTest so that the
mock nodes actually accept the incoming connections.
Stupid syntax error fix

Why do I need to take out the parentheses anyway?
Fixed another stupid syntax error

PassOnSearchTest now passes unit test. Testing still hangs on completion
and has a disturbing amount of socket errors.
Fixed disconnection test, now passes

Still hangs at end of test. Still unexpected socket and timeout errors.
Bleh.
Added a lot of exception handling

P2PNode now gracefully shuts down instead of throwing a fit when it hits
socket errors. Theoretically.
Killed last of outside-test errors

A P2PNode's connection thread now checks if its ID is actually in the
node's connection dictionary before trying to delete it.
Fixed another syntax error

Now no outside-test errors or in-test errors, only failures. Still hangs
after testing because of course it does.
Unit tests pass

All P2PNode unit tests now pass. Still hangs after test completion
because of course it does. *headdesk*
Unit test now checks shutdown properly

Shutdown unit test previously only checked if the node's shutdown flag
was true. Now it checks the flags of all possibly running threads.
Added shutdown flag changes

P2PNode.shutdown() now properly sets shutdown flags on all threads.
Naturally this actually made things worse.
Fixed unreleased lock

When one acquires a lock, one must also remember to release it. Still
got errors, but no longer hangs on test completion.
MakeNodeReq test makes mock thread instead of str

shutdown() doesn't test whether a value in the node dict actually *has*
a flag called shutdownFlag before attempting to set it. Unit test now
obliges it.
All P2PNode unit tests pass!

Still takes an unpleasantly long time to stop running after finishing
but it *does* stop.
Dunno what happened here
Interim commit to shift work to another computer

Currently broken, no guarantees about execution results
BuyerNodeTest unit tests complete

Going a little lighter on the unit tests this time. Not much time left
here!