A theoretical and numerical study of thermosolutal convection: stability of a salinity gradient solar pond