Chrono cleanup

This PR tackles the conversion from posix_time based interfaces to chrono based interfaces. Existing functionality is retained (but posix_time support should be deprecated). See #1190.