fix #31856: add option to trim whitespace from exported PNG

Added command line option "-T margin" to trim exported PNG with specified number of pixels as margin (0 works; if margin is too big for page in any direction, it stops at that page edge).  Along the way, discovered user preference for transparency was being ignored on export (honored only for screenshot mode) and fixed this.

I would love to also have the trim option working for SVG export, but the way it is implemented is totally different from PNG, so there was no easy way I could find to make this work.  I'm sure someone with a deeper knowledge of Qt graphics and/or the representation of page elements in MuseScore could pull it off.
To be on the safe side I would add Element::Type::SPACER and maybe ELEMENT_LIST and others _LIST ones.
We could implement Element::isPrintable() too. Might be useful in other contexts.