Fix lack of sanity checks on pStat structure in NspiQueryRows leading
to uint32_t overflow and later on array overflow (#cr-1876)

Add Zentyal functional testsuite to mapitest and test coverage for cr-1876