[ticket/11495] Fix some more comments and the package tag

PHPBB3-11495
[ticket/11495] Fix docs of add_item_to_nestedset() and take id as argument

PHPBB3-11495
[ticket/11495] Move lock code into two methods to allow easier handling

This also allows to simply remove the lock handling by overwriting the two
methods acquire_lock() and release_lock().

PHPBB3-11495