[ticket/11486] Root path function created and existing code refactored

A method called get_board_root_path() was created to make getting the root
path easier. Existing uses of $root_path were updated to use this method

I ended up re-doing the ticket/11486 branch instead of fixing all of those bad commits.

PHPBB3-11486