Ten Brushes Script: Add preset memory.
This adds a little check to allow a Ten Brushes action
to memorize the preset used beforehand.
Then, when the action is triggered, but the current preset
is already the associated preset, the script will give back
the old preset.
This should allow switching back and forward between presets
quite smoothly.
(cherry picked from commit b76fe11c85e09b1b19a72c7e4a38af63b1d71c80)