[src/IndexFile.cpp] fix usage of "assert"

when removing "#include <assert>" from the included header
"base/Time.hpp" (unrelated commit), this cpp-file breaks. to fix this
include an "assert" and unify the usage everywhere else.

would like to replace them all by exceptions, which can have a more
informative message, but hey...

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>