papi: use context manager
papi: use context manager

Former-commit-id: 80e54287531e1734be849dd29e2086b16d4eadfd
Former-commit-id: 9544b5b2bc1a781a98e13f13b53d264ec8c2c267 [formerly e958ffc1ae426f0d3907aa330c92b668f4aaad5d] [formerly 40a33cc656c949e66c253ee50bd77f383f05cb87 [formerly e56f88d840b1b6d8cd29c5b159a8e554fe02228e]]
Former-commit-id: 5edcc9b0d800d8a6117ac820ff5e8e5e37ec863e [formerly dc65d5329527f90eb20479ce305a40d01f4079cd]
Former-commit-id: 0b7f7458fc4c6a939cfe98ec181198020d40197a
PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild