Allow non-async optionalUserAction.

This duplicates @smessmer's changes for authorizedAction.
Whitespace cleanup
Merge pull request #56 from mikesname/add_async_apply_to_optionalUserAction

Allow non-async optional user actions