build: use subdir-objects for automake

Fixes #147. This does what it sounds like, putting objects in the subdir rather than root. Verified that it doesn't upset the current build, and doesn't cause problems when merged into bitcoin.