A big round of bugfixing and cleanup

Commit messages should summarise this well enough, but here goes:

* Rewrite `build_address_string` utility function to be sane
* Removed code that was duplicating libmarquise functionality
* Minor type signature cleanup to make gcc warnings go away
* General formatting cleanup
* .gitignore ftw