Various Stability Improvements

Converted runMessages loop to an iterative implementation.

A few memory management bugfixes for network reading/writing
Merge branch 'master' of https://github.com/DaMSL/K3-Core

Conflicts:
	runtime/cpp/Engine.hpp