Make the multi-get calls throw 400 errors on invalid input

Also refactor ways and relations to use the same structure as nodes
Add functional tests for nodes/ways/relations API methods