Add production target to makefile.
Mess around a little with the logging formats.
Fix integer overflow when parsing peer ID.

int8_t can only hold -128 to 127, so values outside of that range (e.g.
0xff) did very bad things.
Add production/debug defines.
Fix sorted set ranking.

The indexer expected the rankings to be times in ms. The tracker was
generating them in seconds, causing them to be deleted more or less
instantaneously.
Migrate more printf statements to logging macros.