On a General Theory of Characteristics and the Method of Invariant Imbedding