Passes id iterable as ResourceIterable into IdMapper

since that needs to be closed after reading.
Correct a bit mask for collision marker for encoded strings

for the id mapper that encodes strings into longs in the batch importer.
This faulty bitmask was discovered when importing nodes with very long
string ids, therefore such a randomized test was added as well.