Nanoscale three-dimensional magnetic sensing with a probabilistic nanomagnet driven by spin-orbit torque