[backport] change lockInterruptibly() implementation to throw java.lang.Interrupted...

...Exception when interrupted. fixes #3969