Coherent control via weak measurements in P31 single-atom electron and nuclear spin qubits