py: Add typecode to buffer protocol.

When querying an object that supports the buffer protocol, that object
must now return a typecode (as per binary.[ch]).  This does not have to
be honoured by the caller, but can be useful for determining element
size.
diff --git a/py/objstr.c b/py/objstr.c
index e444ec7..a682144 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1326,16 +1326,18 @@
 }
 #endif
 
-STATIC machine_int_t str_get_buffer(mp_obj_t self_in, buffer_info_t *bufinfo, int flags) {
-    if (flags == BUFFER_READ) {
+STATIC machine_int_t str_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, int flags) {
+    if (flags == MP_BUFFER_READ) {
         GET_STR_DATA_LEN(self_in, str_data, str_len);
         bufinfo->buf = (void*)str_data;
         bufinfo->len = str_len;
+        bufinfo->typecode = 'b';
         return 0;
     } else {
         // can't write to a string
         bufinfo->buf = NULL;
         bufinfo->len = 0;
+        bufinfo->typecode = -1;
         return 1;
     }
 }