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 
we can likely not test this in general. But at least manually once.