fix issues in test_context_refcounts that were unnoticed yet as they did not make the test fail
flask view function may return bytes/str/unicode
Merge pull request #751 from ThomasWaldmann/sprint-branch

fixing issues found while debugging, fix error in 1 test