Change location of directory check in build_api.sh

This ensures that the log directory is in-place before rake tasks
are run that could generate log entries.
Add cleanup tasks to build_api.sh

Add tasks to clean temporary & cache directories, and clean out
the QA reports queue.  The latter change helps with updates
between revisions that have incompatible reports.
Add comment to build_api.sh
Change API build to use task for clearing reports

Have build_api.sh use the `contentqa:delete_reports' task instead of
using `rm -rf'.  It's safe to do so now because all branches of the
`platform' app that lacked this task are now merged.
Merge pull request #5 from dpla/improve-api-build

Improve api build