Instability and breakdown of internal gravity waves. I. Linear stability analysis