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 no-commit-on-exit
in 39 seconds and was queued for 5 seconds