Pass the Entity when evaluating script variables

For some reason we passed NULL as the current entity when dereferencing
script variables inside strings.
Rename IO -> Entity in script::Context
Handle NULL entities in GetSystemVar
Cleanup getSystemVar()
Replace specialstrcmp with boost::starts_with
Remove unused SAFEstrcpy() function
Replace IsIn() with boost::contains()
Replace toLowercase() with boost::to_lower_copy()
Replace makeLowercase() with boost::to_lower()
Escape command-line args in the crash information
Remove unused atob() and bota() functions
Remove the itoa() function

Replaces with std::ostringstream and boost::lexical_cast.
Remove the atoi(std::string) function
Move platform/String.{h,cpp} to util/