uci: do not commit on exit if there was no change done

We should not commit every time we exit from context because that can
take a long time. This remembers if some changes could have been done
and otherwise we do not commit on exit.
4 jobs for v0.4.2
in 36 seconds and was queued for 4 seconds
latest