Refactor duplicate code for a lot methods that affect actions

This patch introduces a private function that creates functions we can
assign to the ‘Luvent’ table as methods.  The existing methods which
change a property of a specific action all follow the same steps:

1. Find the specific action to change.

2. Make sure that action exists and that the new value is of the
correct type.

3. Update the action property with the new value.

This new function creates a method which performs all of these steps.
We use this function to replace the implementations of methods such as
setActionInterval() and removeActionPriority(), whose implementations
are basically identical.
Improve the unit test for adding actions that are tables

This adds an assertion to the test so that we are more certain that
addAction() accepted the table we gave it as a parameter.
Simplify the implementation of createActionSetter()