Text this: Bayesian inference with incomplete knowledge explains perceptual confidence and its deviations from accuracy