TRQ-2529. Fix a job being in a running state with no exec_host value defined
TRQ-2563. Fix some valgrind issues.
Remove some repetitive code from the container.hpp file.
TRQ-2563. Fix some valgrind and coverity complaints.