Halo: add functions to mock/unmock a method

Can be used to mock static methods using runkit since phpunit doesn't
allow it anymore