Add memory.swapUsedPercentage metric

This adds derivative swap percentage metric. Use case for this is alerting based on metrics.
I had to refactor the code a bit to make it testable, tests included.