Function lockAllBindings

Locks all the specified bindings and returns a function for unlocking them in reverse order.