select_actions/3 will not select the same action multiple times in
different top level goals.
Fixed update/1 to no longer asserts things already in the database.
Replaced tries with normal Prolog dynamic assertions in resolve/5 to
have control over ordering.