Uses Java's Instant instead since its more stable and other places seemed to use Java's time APIs as well. (cherry picked from commit 096f1da17cbdd39a4cace3aea0121228be30e576)
Introduce compat source sets and move all kotlin sources to the main directory [no changelog]