Electronic and Magnetic Properties of Monolayer and Bilayer Phosphorene Doped with Transition‐Metal Atoms