[WIP] Convert create_function calls to true anonymous functions

With the recent bump in minimum PHP requirement as PHP 5.3, we can use closures and true anonymous functions, which are better, more readable and less memory intensive.

Currently I believe I got almost all of them but a few are still left, and these are barely tested. So don't merge them yet and any help testing them will be appreciated. Thanks!