Use `int` instead of `size_t`.

`size_t` will make it hard to debug our FLANN wrapper and FLANN uses negative `int` values.
Clean up unit tests.