Making code follow coding standards

* making data members protected (to allow derived classes to access them)
* adding getters
* making callbacks friend with the class
* renaming _snes to snes_ctx (to avoid name clashes with the snes() method)