Fixes to the pin mapping code

- pinmap.c code fixes
- change UART IDs to the eLua notation (0-based)