First wave of python cleanups.

- make logger global variable, perfectly standard and acceptable
- add TODO
- make index_loop dynamic by it looking up op functions in a dict
- use client.indices and client.cluster instead of constructing
  IndicesClient/ClusterClient

minor:
- .keys() on a dict is uniqueon it's own, sorted accepts reverse=True
- exception is an unknows symbol. Unknown exception will now just be
  propagated
- don't check 'ok' in response - it has been removed and any non-ok
  responses would result in exception anyway
- log_file was unused