Add getVariable() function to the formula parser

This is designed to be a more robust function for accessing object variables. It will be replacing all of the various getCharacter and stat functions as well as the objRef function. It will also be used for any other future variable referencing functions.