Extend locked API to tell if self holds the lock.

This is not needed on non-distributed lock.
Rename classes.

Preserve backward compatibility.