Made parsers call methods on `osmdata_t`.

This is the first step in removing common code from the output
types and adding it into a common "management" layer which is
capable of supporting multiple output types.
Add, modify and delete nodes from mid directly rather than via out.
Almost removed all mid interactions from out way functions.
Removed calls into mid from out for relations.
Change pgsql output to get information from middle about pending relations from ways rather than modifying the middle.
Moved `start`, `stop` and `commit` to `osmdata_t`.
Starting to split out `iterate_*` functionality.
Added subdir-objects automake option to keep it happy with newer automake version in Ubuntu 14.04.
Moved call to mid in interations out to `osmdata_t`.
Iterate in `osmdata_t`, so that multiple can be handled.
Removed references to `output_t` from middles. Note this also removes the "helper processes" from way & relation iteration, which will have to be added back in another commit.
Use a (base) query interface so that outputs cannot perform modifying operations on the middle.
Merge remote-tracking branch 'MapQuest/kk_multiback' into mla_multi_backend

Note that there were several conflicts, and also one of the gazetteer tests
stopped working. The issue there was a use-after-free bug, which didn't
seem to be due to the merge but was pre-existing.

Conflicts:
	middle-pgsql.cpp
	osm2pgsql.cpp
	output-gazetteer.cpp
	output-gazetteer.hpp
	output-null.cpp
	output-null.hpp
	output-pgsql.cpp
	output-pgsql.hpp
	output.cpp
	output.hpp
	tests/test-parse-xml2.cpp
Merge remote-tracking branch 'MapQuest/kk_multiback' into mla_multi_backend
Merge remote-tracking branch 'MapQuest/kk_multiback' into mla_multi_backend
remove superfluous methods in output close and connect when these operations were actually happening in other methods. move factory methods for middle and output to static base methods reduces annoying forward declarations and is cleaner. still lots of pulling left to do from output_pgsql_t to table_t to go though
reorganize output_pgsql_t::start so that we might be able to stop it from accessing the tables connection directly