Precision determination of the fine-structure splittings of the 5d and 6d states in potassium