use istype instead of isinstance for canning tuples/lists

and add explicit support for namedtuples
test serializing lists / tuples / namedtuples
test namedtuple as return and apply arg
remove unused namedtuple import
Merge pull request #2951 from minrk/typecheck

use istype on lists/tuples