Don't generate unique locks for file editing.

Using a pointer in a lock is not a good idea, because the lock database
will grow unbound. To make a lock that's unique to the promise in policy
code, use the line number in policy.

Redmine #5637