Single-beam three-axis atomic magnetometer