Nonlinear Evolution Of Localized Internal Gravity Wave Packets: Theory And Simulations With Rotation, Background Flow, And Anelastic Effects