Vanishing cycles for D-modules