Get rid of pregReplaceCurry and use closures instead

Perks of PHP 5.3+, we can use closures instead of currying our way to pass scope into the callbacks, saves us from a lot of create_function hell

Signed-off-by: Shitiz Garg <mail@dragooon.net>