core: persistent in-memory lock for remove template

This patch replace the existing exclusive lock of the remove template
command with a persistent (isReleaseAtEndOfExecute = false) exclusive
lock. there's also a new customized error message attached to the
modified lock.

Note that the lock of the template in DB remains so all the places
that check whether the template is locked according to the status in
the DB will still get valid result.

Change-Id: I6cec457a44e4059e21c344acdaf8d17c9d26c686
Signed-off-by: Arik Hadas <ahadas@redhat.com>