Fix issue #11: incorrect checking of pin validity in BCM mode
Fix issue #11: incorrect checking of pin validity in BCM mode

The getPinBcm function is used in BCM mode to validate that the supplied
pin number (aka "channel") is a valid BCM pin. However the code currently
uses a static list of pin numbers to perform this check. This is
problematic for three reasons:

 1. The list of valid BCM pin numbers is incorrect - it's actually a list
    of valid RPI pin numbers
 2. It cannot handle different sets of valid pin numbers in the v1 and v2
    layouts
 3. It leads to the same configuration being stored in two places and thus
    being required to be kept in sync manually

The incorrect behaviour has not been picked up by unit tests because of
bugs in the test cases.

This patch resolves the problem by dynamically creating a list of valid
BCM pins from the primary pin map configuration at the same time the
hardware version is checked and the currentPins variable set to the
appropriate pin map. The getPinBcm has been changed to use this list
instead of the static list. Issue #11 is resolved because the list being
used in this lookup/validation function is a list of BCM pins rather than
the incorrect list of RPI pins.

JamesBarwell/rpi-gpio.js