py: Add mp_obj_get_int_truncated and use it where appropriate.

mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type.  Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
diff --git a/py/stream.c b/py/stream.c
index 640659e..258f916 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -225,7 +225,7 @@
     // https://docs.python.org/3/library/socket.html#socket.socket.recv_into
     mp_uint_t len = bufinfo.len;
     if (n_args > 2) {
-        len = mp_obj_int_get_truncated(args[2]);
+        len = mp_obj_get_int(args[2]);
         if (len > bufinfo.len) {
             len = bufinfo.len;
         }