Database changes for multi-engine support

Add a stack_lock database table to use as a distributed stack lock to
avoid race conditions when multiple engines are deployed.

Blueprint multiple-engines

Change-Id: I0b8e244a73295dca307cb09ea5da2ebe709134b1
Implement stack-locking for multi-engine support

Implements a distributed stack lock using the database to avoid race
conditions when multiple engines are deployed.

Blueprint multiple-engines

Change-Id: If3c47dafcc5bc1b2188b7737205291bbab8bc231