Includes a tiny class for scoped set-reset of a variable, which is used here to store the current drawing mode. Fixes: lp:1218629 * https://bugs.launchpad.net/kicad/+bug/1518629