[WIP] unit tests for Application and ZfModule modules

Cherry-pick of bc4516e.

/cc @personman