Add is_typeddict function to typing.py to check if a type is a TypedDict
class

Previously there was no way to check that without using private API. See the
`relevant issue in python/typing
<https://github.com/python/typing/issues/751>`
