IMPALA-916: Reduce the probability of two SendReport() calls at the end of the FragmentExecution.

Try to reduce the cases where two reports are send, once by the PlanFragmentExecutor
and once by the reporting thread, by adding an atomic flag. Added a couple of more
functions in AtomicInt (safe read and cas which returns the latest "old" value).

Change-Id: Ie59026c1f184af96e95b2f848eb86bc4c86f7c67
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2680
Reviewed-by: Ippokratis Pandis <ipandis@cloudera.com>
Tested-by: jenkins