Implemented IntArray as first-class int array

previously IntArray was just a facade on top of LongArray.

- For this occasion LongArrayFactory has been renamed to NumberArrayFactory
  with two added methods newIntArray and newDynamicIntArray.
- NumberArray, which is the super interface of LongArray/IntArray now
  extends AutoCloseable (but doesn't throw any checked exception) so that
  off-heap implementations may free its allocated memory.
- Cache structures used by the importer also now has a way of being closed
  and are indeed closed after used.
- Enhanced testing of heap/off-heap Long/IntArray with randomized testing.
Merge pull request #3621 from tinwelint/2.2-better-cache-arrays

Implemented IntArray as first-class int array