Which cranial nerve provides primary motor innervation to the intrinsic and extrinsic muscles of the tongue?