Fixed the android build.
Ported `chronyLib` to Joda DateTime.
Implemented event sample interval counting with binary search.