Terminate when out-of-memory

Adding a Terminate method to the Util class, and call that method in the situation of out-of-memory instead of throwing an exception.

@emanuelez @cmelchior @bmunkholm 
this is untested and doesn't work due to important spell error :-)