Make content connector templates serializable
fix caching for velocity templates
set velocity macro scope to local

Templates can now use their own macros, if a macro was declared in a
template before it was written to the global scope and could never be
overwritten because local macros are not allowed to overwrite global
macros
stop update checker if thread was interrupted
fixed possible npe in getTemplate
intialize the cache in a static code block
added tests for VelocityTemplateManagerFactory
move Cache intialization back to getTemplate Method

Portletcache is not intialized in a static block which can lead to
errors, when getTemplate is called the Portelcache should be available
improved comments and javadoc
fix template names must be unique in getTemplate

in some cases the same template names are used for templates with
different sources, this fixes the  caching in getTemplate so that
templates with different sources are stored under different cache keys
added sample config for template caching
Add thread safety in Velocity template evaluation.
Remove unused method.
add null checks in getTemplate to fail fast
added assertion texts in tests, formatting
Fix early return condition in getting template from cache.
Merge pull request #1 from pep1/dev-velocity-caching

Add thread safety in Velocity template evaluation.
check if cached object is the correct class
add null check to avoid possible npe
remove unused private method