General Geometrical Theory of Crystalline Interfaces