[ticket/11495] Use item_id only as parameter for get_branch_data()

PHPBB3-11495
[ticket/11495] Use item_id only as parameter for delete() and remove()

The data is acquired again anyway

PHPBB3-11495
[ticket/11495] Cast some values to int

PHPBB3-11495
[ticket/11495] Use item ids instead of requiring all data

The data is grabbed again in most cases anyway, so it just makes the system
easier to use.

PHPBB3-11495