Set a timeout of 90 seconds for DynamoDB to reply, should normally be much faster than this.

Also set the keep_alive maximum socket count to a number larger than one, and use a proper
User Agent identifier.
Don't encode undefined values part of PutRequests in batch_write_item.  This
matches the behavior of put_item.