Make API logging more useful

Make the API client log out a warning whenever an HTTP 4XX or 5XX response is
received. Demote messages detailing the contents of every single request and
response from priority "info" to "debug".
Merge pull request #1589 from Ichimonji10/better-logging

Make API logging more useful
Trim down .gitignore file

Only ignore files and directories that are relevant to this project.
Unnecessarily ignoring files can make troubleshooting especially hard in
situations where a troublesome file is invisible to git.