Fixed bug with TypedList example

Fixes TypedList example that was failing in /doc/library/typed_list.txt. Also added unit tests for the 2 TypedLists example to prevent this in the future.

Issue was raised on mailing list : https://groups.google.com/forum/#!topic/theano-users/orib7a6ew-A
It is needed to have a consistent interface with other types and avoid TypedList-specific code every time we need to get the ndim of a variable. Can we just return the internal ndim + 1 or would that cause other issues?