HPCC-10103 - Refactoring based on code review

Signed-off-by: rpastrana <rodrigo.pastrana@lexisnexis.com>

Conflicts:

	esp/services/ws_sql/ws_sqlService.cpp
	esp/services/ws_workunits/ws_workunitsService.cpp