socket detection fixes from cperry

Cliff found a few issues with the socket detection. The new socket detection
attempts are (in order of attempt):

 * lscpu
 * physical socket count from /proc/cpuinfo
 * dmidecode
 * processor count from /proc/cpuinfo