Magnetic sensor having hard bias structure for optimized hard bias field and hard bias coercivity