Fixed detection of the presence of givens/updates

Since they can be dictionaries, their emptiness shouldn't be checked by
comparing them to a list.
Regression test for fix from 8625e03
Avoid useless warning in theano.function()

If the dictionary has <= 1 element in it, then we do not care if it's
unsorted.
Prevent replacing function inputs with `givens`

This is just confusing as it does not actually modify the function
being computed, as mentioned on the mailing list.
More helpful error message
A few PEP8 fixes
Merge pull request #1213 from delallea/minor

A few improvements to function()