webapi format symbol and post data validation, specs, refactor

- webapi makes sure the request contains a valid format symbol (.json
or .xml) and returns appropriate error message if not
- webapi catches exception if invalid post data is given and cannot be
parsed, returns error message
- added specs to invalid_api_spec to verify the new functionality
- for all xml responses, renamed root element from ‘hash’ to ‘response’
- refactored ‘request_params’ to ‘request_data’