Theoretical Foundations of Threat Assessment by Inverse Optimal Control