btle.py: flush pipe to helper after writing, fixes hanging on Python3.4
btle.py, sensortag.py: bytes vs string fixes for Python 3.4

Note I'm replacing chr(xx) with struct.pack("B", xx), so that
write data is 'bytes' on Python3.4, not a string. Passing a string
to Characteristic.write() is deprecated on 3.4, as not all data
blocks can be represented using the UTF-8 encoding of a valid string.