Added tests for nested SQL functions in Zend_Db_Select

This regression was introduced [here](d8785057e1d4c76600f8917c56e64edca41d6abf). The tests may not be in the correct place, but right now they are failing. I myself am not a master of regexes, so maybe someone can introduce a quick fix. The problem is present in the latest production version 1.12.8.