Adding an atomic-swap function to AtomicInt and more tests in atomic-test

Change-Id: Iec7de204dca1bc07e76ea3e596a57432b1335997
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3972
Reviewed-by: Ippokratis Pandis <ipandis@cloudera.com>
Tested-by: jenkins