fixed another last attach bug
Fixed bug where last attach source would go to 0 (nothing connected) after unplugging second device
Added a battery level read to startup so that a reset during attachment doesn't make the SOC level jump to a default setting (still need to identify the reset source)
added reset of port controllers when coming out of sleep to try to prevent weird unresponsive state that occassionally happens (need to verify actual source of this behavior)