tests: Time db writes

Credit for this largely goes the the bxt_timing tool in Buxton, which
performs far more stressful tests and actually measures in nanoseconds.