Quantum oscillations and nontrivial topological state in a compensated semimetal TaP2