Dynamically adapt column size in lists

When hostnames are too long, they tend to get on top of each other in the unresponsive list, which is not very useful.

This patch sets the number of columns and column size dynamically to avoid this behaviour.

While I'm at it, I've added Util functions so we can do that everywhere.