library: cleanup the mess a bit

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
profiles: speed up loading process a bit

Mostly we don't need to force two scans when the user just
wants to change some per app profiles.
This chould improve loading of the profiles fragment just
a little bit.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
profiles: sort per app profiles by name

And doing a lot of cleanup here as well as some small
performance enhancements.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
profiles: improve general memory footprint

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
profiles: fix deleting during fragment switch

It's kind of strange if we switch the fragment and deleted
a profile previously. The UndoBar would do some crazy stuff,
better handle this properly and set the right context.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
memory: fix trimming on non-supported fs

If the filesystem in question doesn't support the trim
command it would just "loop" in the dialog until the
user forces to close the app.

Fix that by actually checking if the filesystem *maybe*
supports trim and show an options menu depending on the
fs.

The only thing this doesn't fix is checking for "fstrim"
if its supported on the filesystem, because even we are
on the right fs, it could just not be supported.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>