Use less space in hashtables for microdescriptors
This commit refactors some of the code in tor-netdir
and tor-dirmgr
to use less RAM, and run a bit more efficiently.
Back-of-the-envelope calculations: assuming 7000 relays in the consensus, previously we'd use 315 KiB minimum for these tables, and 568 KiB maximum when downloading. With this branch, we should now use 54 KiB minimum, and 369 KiB maximum when downloading.
Closes #386 (closed).