Make compute_api use objects for lock/unlock

Converts compute_api.lock and unlock to require objects and modifies the
callers to pass them.

Related to blueprint compute-api-objects

Change-Id: Ice8361328cdfeb92207c778beb07b55a9d4eda8d