Mexico is investigating allegations of online spying against prominent journalists and activists. President Enrique Pena Nieto has denied involvement, saying that spying sofware is only used against suspected criminals.