Waveguide-integrated chip-scale optomechanical magnetometer