Double tangency theorems for pairs of submanifolds