Stability of Hamiltonian Systems of Two Degrees of Freedom and of Formally Conservative Mappings Near a Singular Point