Stochastic Optimal Control for Diffusion Bridges in Function Spaces