fix some bugs when throwing ArgumentOutOfRangeException

Some fixups by roji

Conflicts:

	src/Npgsql/NpgsqlCommand.cs