Better qualimap axes

Main change here is that the x axis for most qualimap plots is now determined automatically when run without an explicit parameter, instead of using a hard default. How this is decided varies on the type of data, typically `2 x median` value or something similar. This code is entirely self contained now, so much better than earlier attempts at doing this.

Second small change is the addition of `plot.close()` statements. This makes no difference when run on the command line, but when the function is imported into another script and used to generate a lot of plots it dramatically improves memory usage.
I was trying to be safe here in case `if not max_x` was also true for `None` or any other of these special types. To be honest, for this specific case where I'm essentially using `False` as a custom flag I think it's clearer to explicitly mention `False` to help link that with the code above, so I might leave this one as it is if that's ok.