MCP23017 module refactorings to save some heap (#3317)
MCP23017 module refactorings to save some heap (#3317)

* mcp23017: functions to metatable

Avoids closures for each module.

* mcp23017: inline constants

Saves nearly half a kilobyte of heap.
nodemcu/nodemcu-firmware,eku/nodemcu-firmware,vsky279/nodemcu-firmware,HEYAHONG/nodemcu-firmware,FelixPe/nodemcu-firmware,vsky279/nodemcu-firmware,HEYAHONG/nodemcu-firmware,vsky279/nodemcu-firmware,nodemcu/nodemcu-firmware,FelixPe/nodemcu-firmware,FelixPe/nodemcu-firmware,HEYAHONG/nodemcu-firmware,eku/nodemcu-firmware,vsky279/nodemcu-firmware,HEYAHONG/nodemcu-firmware,FelixPe/nodemcu-firmware,eku/nodemcu-firmware,nodemcu/nodemcu-firmware,nodemcu/nodemcu-firmware,nodemcu/nodemcu-firmware,FelixPe/nodemcu-firmware,eku/nodemcu-firmware,HEYAHONG/nodemcu-firmware,vsky279/nodemcu-firmware