Replace is_aligned with non-LGPL version
Replace is_aligned with non-LGPL version

Turns out compilers can optimized val % (n^2) == 0.
https://godbolt.org/g/tSXo7t
MRPT/mrpt,MRPT/mrpt,MRPT/mrpt,MRPT/mrpt,MRPT/mrpt