Move third-party code into a vendor directory

This pull request isn't finished yet, but once it's done, it will resolve #166.