Ab initio study of unzipping processes in carbon and boron nitride nanotubes under atomic oxygen impact