Extracted much of the client code to its own subtree

I'm sure that there's a few things that should be cleaned up, but it's in a good state, and I really want to get the merge process started.

Here's the TortoiseJS repo:
https://github.com/qiemem/TortoiseJS