Wait for external DB processes to finish before the task finishes.
Otherwise chaining rake tasks like `sq:drop sq:create` will end up in
weird errors because the `dropdb` command might not have finished when
`createdb` was run and hence result in an error.
Merge pull request #1615 from padrino/wait-for-external-db-processes

Wait for external DB processes to finish before the task finishes.