Exact Simulation Methods For Functionals Of Constrained Brownian Motion Processes And Stochastic Differential Equations