Python 3: fix the _calc_signature_* functions

This commit makes the _calc_signature_* functions work in python 3. The issues
were usual text strings vs bytes that arise when porting code to Python 3.

Change-Id: I36b40012b09d4f72e9248b49d51dc545d70abfc6
Fix typos in documents and comments

Fix typos detected by toolkit misspellings.

* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: Ifbbc29537d9d129aad238de6c37718c4fbb8349b
Merge "Python 3: fix the _calc_signature_* functions"
Merge "Fix typos in documents and comments"