lib/MemoryCounter: Change test program
lib/MemoryCounter: Update counters on exception

A basic block in LLVM may include an instruction which calls
__cxa_throw(). This function is used to implement C++ exceptions, and
will never return. This means that if an exception is thrown, the number
of STORE+LOAD instructions for that basic block will be lost.

To fix this, we can insert counter increment instructions before all
calls to the __cxa_throw() function.