Revert "Only test with Python 3.3 on Travis"

This reverts commit c0d4e4b0f5499ac074b31ed1603404d415e02e91.

Looks like Travis only runs Ubuntu 12.04 LTS, the distributed Python
version of which is Python 3.2. If we insist on going with Python 3.3,
Travis will install its own version of Python, which cannot access
system packages like python3-pyqt4 or python3-gi.
Install python3-mock on Travis
Fallback to mock instead of unittest.mock
Merge pull request #31 from lewtds/fix-travis-mock

Fix unittest.mock on Travis
Fix a missing conditional check error
Add tests for BaseBackend
update_composition() should save the argument as editing-string
Fix text expansion always return ""

Because can_expand() only has read-only access to expanded_string. It's
how Python's closure works.

ISSUE: https://github.com/lewtds/ibus-ringo/issues/32
BaseBackend.reset() should create a history entry
update/commit_composition() in base class
Comment formatting to fit PEP8
Use history with BaseBackend.process_key_event()
Use history with BaseBacekend.on_space_pressed()
Use history in SurroundingTextBackend.process_key_event
Dump SurroundingTextBackend.previous_string for history
Use history in BaseBackend.on_backspace_pressed() and undo_last_action()
Don't reset() in undo_last_action()

Since reset() creates a history entry, it will hide the entry created by
undo_last_action().