Put all tags for a given instance into a list for a single batch insert

Addresses #414 by using the execBatch feature of QSQLQuery.

Might still be improved if we can do other operations as batch inserts
as well.
Merge pull request #415 from pieper/414-batch-insert-tags

Put all tags for a given instance into a list for a single batch insert

Thanks for the reviews @nolden and @jcfr - I'm going to go ahead and do the merge (same tests fail as before ;( so no harm from this pull.
Fix configuration of CTKConfig based on DCMTK_HAVE_CONFIG_H_OPTIONAL value

This fixes the logic introduced by commit a32f524. Since the variable
is set to TRUE or FALSE only when DCMTK is looked up without using
DCMTKConfig, in case CTK is build against a version of DCMTK providing
DCMTKConfig, we need to also check if it is defined.

See #413
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'

* 413-associated-dcmtk-definitions-to-ctkdicomcore:
  Fix configuration of CTKConfig based on DCMTK_HAVE_CONFIG_H_OPTIONAL value
Add convenience function "ctk_list_to_string"

See #418
Automatically reformat list passed to "CTK" inner build.

See #418
COMP: Add support for CTK_USE_SYSTEM_* options

This commit update CTK build system to support configuring CTK
passing CTK_USE_SYSTEM_* CMake variables.

To do so it introduces a new macro allowing to recursively traverse the
external projects dependency tree.

The traversal is done in two passes. The first pass traverses the complete
tree to set the value of CTK_USE_SYSTEM_*.

The second pass invokes the "ExternalProject_Add" function and displays
informative messages. An external project could be either:

 - Optional: The project is not required considering the current
             CTK options.

 - Ok: The project has just been included.

 - Included: The project has already been included because of prior
             requirement.

Support for the following options has been added:

  -DCTK_USE_SYSTEM_ITK:BOOL=ON
  -DCTK_USE_SYSTEM_DCMTK:BOOL=ON
  -DCTK_USE_SYSTEM_OpenIGTLink:BOOL=ON
  -DCTK_USE_SYSTEM_VTK:BOOL=ON
  -DCTK_USE_SYSTEM_KWStyle:BOOL=ON

See #418