make NDims a const

for compiler optimizations
remove extra hacks, compiler will optimize this

no need to be this smart, remove extra code, compiler does
loop unrolling
removeindexGeZero check, UInt is always >= 0

and index is defined to use UInt, so the check is tautologically true
Merge branch 'master' into clang-warnings
Merge pull request #251 from breznak/clang-warnings

Clang warnings, NPC-136