There were problems with two range checks in the switch plugin port
allocation code. The first would trigger an assertion when trying to
reserve a port one beyond the bitstring range, and the second would
prevent releasing the last port in the range. This patch fixes those
issues.