Fix CloudSearch2 to work with IAM-based search and upload requests

Fixes https://github.com/boto/boto/issues/2657.
Correctly signs headers when submitting batch uploads and search requests.
Why was this particular code moved up a few lines? Does it warrant a comment?