Improved pin validation depending on mode

pins should be validated depending on the mode wiringPi is running. This is a quite rough validation using an array of valid pins for each mode.
It should be improved.