adding real overloads

we don't need to do any dynamic_casts if the input is already of the
correct type
adding some assertions after dynamic_cast
reorder template parameters

those with default values should be placed at the end
Merge pull request #28 from torbjoernk/feature/overloads

introducing overloaded functions