using six packaged with Theano

Replace following imports:

    import six
    from six.moves import ...

to

    from theano.compat import six
    from theano.compat.six.moves import ...

This removes the dependency on six introduced in #1240.