Hamiltonian structure, equilibria, and stability for an axisymmetric gyrostat motion in the presence of gravity and magnetic fields