Some stability problems in hydrodynamics and hydromagnetics with reference to thermal and thermohaline convection