[ticket/13164] Update post_visibility before event is triggered

PHPBB3-13164
[ticket/13164] Add post_visibility to core.submit_post_end event

PHPBB3-13164
[ticket/13164] Fix syntax error

PHPBB3-13164
Merge pull request #3030 from Senky/ticket/13164

[ticket/13164] data sent to core.submit_post_end event does not include fresh post_visibility