FHRFormer: A Self-supervised Transformer Approach for Fetal Heart Rate Inpainting and Forecasting