Added a better function system to the room xml

You can now have multiple functions attached to the same rooms, and
there is also an ON_EXIT event, too.

I also set it up so that you can make a room function accept a boolean
as a parameter that shows how the system currently thinks the event will
happen, and then return an int (-1, 0 , 1) that affects the outcome of
the event.
Fixed a potential bug in loading rooms with no...

...flags