Some changes to allow installing from a wheel

Those changes are needed so we can install a wheel with pip and run stoq in it.

Everything was tested and the resulting .deb when running debuild should be
exactly the same.

Change-Id: I35122cf415178add0131534e73e2515938617dc9
(cherry picked from commit 5b6076957bd8988636b26b38febaa320ee206be2)