Quadratic functionals of brownian motion, optimal control,and the “colditz” example