Introduce available memory variables in memory monitor

This introduces new variables `<rest{ratio,bar,vbar,ipat}>` to the `Memory` monitor.

Also refactors internal `formatMem` to be less intimidating.

Available memory is determined from meminfo's `MemAvailable:` on 3.14 and
newer, and falls back to `free + buffer + cache` on older systems.