Cleanups for simengine main() integration.

Tasks @T67 @T68 : Completed an initial simulation output writer
and cleaned up the program shutdown. Starts and runs clean, logs
all the data and properly accepts BCP connections. This should
complete story 24.