Flexible design of ultrahigh-Q microcavities in diamond-based photonic crystal slabs.