fixed and tested object has_extension

If you extend an extension and apply it to a class, then thest if the class has the base extension it currently returns false.

Extension2 extends Extension1
Page::add_extension('Extension2');
Page::has_extension('Extension1') should return true, before this patch does not.