Fix NpgsqlParameter.Clone() method. It wasn't cloning the npgsqlValue field.

Thanks @Tradioyes for the test and @kukhar for the patch.
Fix #371

(cherry picked from commit d67a54463849e21c01a8bd4eae19cf5299b41696)
From #377
Improved test to check all cloned fields. Thanks @roji for the heads up!

(cherry picked from commit d22213a62682b34f6c428e57b79bae6b36981b97)
From #377
Fixed a problem in NpgsqlParameterCloneTest backport.

Branch 2.2 doesn't contain TypeInfo definition in NpgsqlParameter.
Backport from #367.
Fixing bug in EF migration for non-fixed length string types.
(cherry picked from commit 048070294279ee0b1a595e8ad5d8d07bdac08553)
Fix prepared dispose after connection close

NpgsqlCommand now listens to its connection's open/close events.
On close, sets its prepare status to NotPrepared, avoiding the
DEALLOCATE on Dispose().

A bit of additional cleanup around command/connection relations,
but further work is needed for cases where the same command gets
transferred across connections.

Fixes #393
Relates to #299

(cherry picked from commit 5329b664c4eb57808d5a5529363632c5f2d885e2)

Conflicts:
	Npgsql/NpgsqlCommand.cs
	tests/CommandTests.cs
Merge remote-tracking branch 'remotes/upstream/2.2' into 2.2