Variational Formulation of Fluid and Geophysical Fluid Dynamics: Mechanics, Symmetries and Conservation Laws