Update testing framework

* Simplify CommandListTest factoring out testing code into reusable function.

* Associated error output with "stderr"

* Exit if function "loadLibraryEx" failed

* Simplify string length computation using QString::size()

* Ensure test can be executed outside of ctest including module
"ResEditTestPrerequisites" based on "TEST_BINARY_DIR"

* Introduce module "ResEditTestMacros" containing test helper function
Add "const" correctness to (remove|add|update)Resource* functions
Add "loadLibraryEx" missing flag to comply with documentation

From [1]:

"Unless the application depends on the image layout, this value should
be used with either LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE or
LOAD_LIBRARY_AS_DATAFILE."

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179%28v=vs.85%29.aspx
Fix library loading on Windows XP.

See http://code.google.com/p/tortoisegit/issues/detail?id=1219#c11