Lookup from DHT if totalPieces == 0.

When downloading magnets we don't know how many pieces there are.
Add flag for creating a torrent file.

Kind of a crude API, but it works well enough to test.
Moved Close method to file.

Less efficient for the bulk close case, but more like a normal file system.
Calculate pieces for torrent.
Improve piece size choosing logic.

Wrote a test for it and everything. :-)
Implement WriteAt in the adapter.

Not sure if this is actually useful or not.
Add a tracker.

Has only been tested with "curl", not with real torrent clients.
Responds to announce requests.
Scrape requests not yet implemented.
Merge pull request #53 from nictuku/nictuku

Lookup from DHT if totalPieces == 0.
Fix peer key logic.

Previously were tracking by the http RemoteAddr, now tracking by the
announce params ip and port.
Handle events.
Merge branch 'master' of https://github.com/jackpal/Taipei-Torrent
Implement scraping
Improve out-of-range panic message.

Should give us more information on the BitSet.IsSet panic message we
are seeing.
Work around potential race condition.

From Issue #54 it looks like we may be adding peers before we have
a torrent. Add checks to reject peers before we have a torrent.
Implement graceful shutdown of tracker.
Be more consistent in the way we report error messages.
Allow creating torrent files that are not relative to current working dir
Add tracker swarm test.

Doesn't work yet. (Leech and seeder don't connect to tracker.)
Improve logging.
Write out announce data correctly.