Use "greener" color (cyan) for cached memory
Sort memory from free to wired
Don't rely on ordering in ioreg output

On my Mac (10.7.5), ExternalConnected appeared before MaxCapacity and CurrentCapacity, so the old solution did not work.