deferred: Improve DeferredUpdates test coverage
From 1% of lines to 12% in deferred/.
From 6% of lines to 68% in DeferredUpdates.php.
* Adding relevant @covers tags to existing tests.
* Add coverage for MWCallableUpdate.
* Add coverage for MergeableUpdate.
Also:
* Make MergeableUpdate extend DeferrableUpdate.
1. Because PHPUnit doesn't support implementing multiple interfaces
in a mock, and would make the mock fail the typehint at run-time.
2. It DeferredUpdates doesn't support having a MergeableUpdate that isn't
itself a DeferrableUpdate given the only way to reach that code is past
methods that are type-hinted with DeferrableUpdate.
3. Making the interface extend DeferrableUpdate helps produce better and
earlier errors. Instead of run-time error:
> Argument 1 passed to addUpdate() must implement interface DeferrableUpdate
> instance of MergeableUpdate given
We get:
> Fatal error: Class .. contains 1 abstract method and must therefore be
> declared abstract or implement the remaining methods (doUpdate)
Change-Id: Ie384bf849a96bb37dc3e4a4154da2b02889e9fc8