Factor out hardware SPI pin numbers; this is a effectively a rebase (and minor modification) of @lurch's original patch which conflicted after the merge of the remote-spi branch.