Degeneration of Einstein metrics and metrics with special holonomy