Python 3 compatibility fixes around string handling (#986)

This fixes the bcc module and all the affected tools for issues related to string handling in Python 3. Specifically, when passing Python strings to C libraries they are encoded as ASCII, and when constructing Python strings from C strings, they are decoded first.
diff --git a/tools/tcpaccept.py b/tools/tcpaccept.py
index 0c556a2..8593837 100755
--- a/tools/tcpaccept.py
+++ b/tools/tcpaccept.py
@@ -159,8 +159,9 @@
         if start_ts == 0:
             start_ts = event.ts_us
         print("%-9.3f" % ((float(event.ts_us) - start_ts) / 1000000), end="")
-    print("%-6d %-12.12s %-2d %-16s %-16s %-4d" % (event.pid, event.task,
-        event.ip, inet_ntop(AF_INET, pack("I", event.daddr)),
+    print("%-6d %-12.12s %-2d %-16s %-16s %-4d" % (event.pid,
+        event.task.decode(), event.ip,
+        inet_ntop(AF_INET, pack("I", event.daddr)),
         inet_ntop(AF_INET, pack("I", event.saddr)), event.lport))
 
 def print_ipv6_event(cpu, data, size):
@@ -170,8 +171,8 @@
         if start_ts == 0:
             start_ts = event.ts_us
         print("%-9.3f" % ((float(event.ts_us) - start_ts) / 1000000), end="")
-    print("%-6d %-12.12s %-2d %-16s %-16s %-4d" % (event.pid, event.task,
-        event.ip, inet_ntop(AF_INET6, event.daddr),
+    print("%-6d %-12.12s %-2d %-16s %-16s %-4d" % (event.pid,
+        event.task.decode(), event.ip, inet_ntop(AF_INET6, event.daddr),
         inet_ntop(AF_INET6, event.saddr), event.lport))
 
 # initialize BPF