[BUGFIX] Handle $GLOBALS['TYPO3_DB'] and plain PHP replacements

* adjust function and method concatenator based on method
* set concatenator to empty string for plain PHP function calls