engine: Added AutoCloseableLock

This wrapper class will allow writing cleaner code, instead of:
lock.lock();
try {
    // Thread safe code
} finally {
    lock.unlock();
}

We can write:
try (AutoCloseableLock l = new AutoCloseableLock(lock)) {
    // Thread safe code
}

A follow-up patch will refactor code to use this new syntax and serve as
an example.

Change-Id: I3864d0e630c04f13e47e9f324414b308bd24290e
Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>