A Trust Region Filter Algorithm for Surrogate-based Optimization