metadata_lock_info part is already implemented, just needs to be checked out:
git checkout 1f761c5615c7414d1ccd88ceb70272029ac263cc plugin/metadata_lock_info/metadata_lock_info.cc
However APC subsystem processes requests only when query plan is available. It needs to be adjusted so that it fills data even if a plugin is idle or waiting for MDL lock.
There is also a minor bug in that revision: it iterates requestor thread ticket list, while it should iterate target thread ticket list instead.