Magnetohydrodynamic equilibria and local stability of axisymmetric tokamak plasmas