loader.cpp: improved file extension checking, made Upper/LowerStr useful

Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
Added string_util to common, small changes in loader.cpp
Moved common_types::Rect from common to Common namespace
Merge pull request #99 from archshift/ext-check

loader.cpp: improved file extension checking, made Upper/LowerStr useful, moved string_util into Common namespace