Pin names like "+V" were incorrectly parsed as doubles leading to broken
comparisons. These caused heap overflows when sorting pin tables
This corrects the comparison so that numeric sorts are only performed
when there is an actual number in the symbol segment. Also adds unit
tests for common error cases
(cherry picked from commit aac6f576c2)