Fix issue of calling abs() in C stdlib

In `StateManager::install()` expression `abs(iter->first - new_value) <= eps)` actually calls `int abs(int)` in C stdlib, and doesn't work for `eps` less than 2 (e.g. `abs(1.99) <= 1`). This issue can result in significant positioning errors.

I also search for all callings to `abs()` and change them to explicit `std::abs()` (`fabs()` should work too) to avoid this type of confusion.