Issue title: could not compile dependency :ecto_sql, "mix compile" failed
 Issue body: ### Precheck

* Do not use the issues tracker for help or support requests (try Elixir Forum, Stack Overflow, IRC or mailing lists, etc).
* For proposing a new feature, please start a discussion on [elixir-ecto](https://groups.google.com/forum/#!forum/elixir-ecto).
* For bugs, do a quick search and make sure the bug has not yet been reported.
* Finally, be nice and have fun!

### Environment

* Elixir version (elixir -v): Elixir 1.7.4 (compiled with Erlang/OTP 21)
* Database and version (PostgreSQL 9.4, MongoDB 3.2, etc.): PostgreSQL
* Ecto version (mix deps):
* jumper 1.0.1 (Hex package) (mix)
  vmiller@example.com (jumper) 3c00542e
  ok
* parse_trans 3.3.0 (Hex package) (rebar3)
  vmiller@example.com (parse_trans) 09765507
  ok
* logger_file_backend 0.0.11 (Hex package) (mix)
  vmiller@example.com (logger_file_backend) 3bbc5f31
  ok
* gen_state_machine 2.0.5 (Hex package) (mix)
  vmiller@example.com (gen_state_machine) 9ac15ec6
  ok
* unsafe 1.0.1 (Hex package) (mix)
  vmiller@example.com (unsafe) a27e1874
  ok
* inflex 1.10.0 (Hex package) (mix)
  vmiller@example.com (inflex) 8366a769
  ok
* base64url 0.0.1 (Hex package) (rebar)
  vmiller@example.com (base64url) 36a90125
  ok
* mimerl 1.2.0 (Hex package) (rebar3)
  vmiller@example.com (mimerl) 67e2d3f5
  ok
* connection 1.0.4 (Hex package) (mix)
  vmiller@example.com (connection) a1cae722
  ok
* metrics 1.0.1 (Hex package) (rebar3)
  vmiller@example.com (metrics) 25f094de
  ok
* unicode_util_compat 0.4.1 (Hex package) (rebar3)
  vmiller@example.com (unicode_util_compat) d869e4c6
  ok
* idna 6.0.0 (Hex package) (rebar3)
  vmiller@example.com (idna) 689c46cb
  ok
* gettext 0.17.1 (Hex package) (mix)
  vmiller@example.com (gettext) 8baab334
  ok
* gen_stage 0.14.1 (Hex package) (mix)
  vmiller@example.com (gen_stage) 9d46723f
  ok
* jose 1.9.0 (Hex package) (mix)
  vmiller@example.com (jose) 4167c5f6
  ok
* ranch 1.7.1 (Hex package) (rebar3)
  vmiller@example.com (ranch) 6b1fab51
  ok
* telemetry 0.4.1 (Hex package) (rebar3)
  vmiller@example.com (telemetry) ae271848
  ok
* eternal 1.2.1 (Hex package) (mix)
  vmiller@example.com (eternal) d5b6b249
  ok
* cachex 3.1.1 (Hex package) (mix)
  vmiller@example.com (cachex) 588bcf48
  ok
* decimal 1.8.1 (Hex package) (mix)
  vmiller@example.com (decimal) a4ef3f5f
  ok
* jason 1.2.0 (Hex package) (mix)
  vmiller@example.com (jason) 10043418
  ok
* poison 3.1.0 (Hex package) (mix)
  vmiller@example.com (poison) d9eb6366
  ok
* ssl_verify_fun 1.1.5 (Hex package) (mix)
  vmiller@example.com (ssl_verify_fun) 6eaf7ad1
  ok
* exconstructor 1.1.0 (Hex package) (mix)
  vmiller@example.com (exconstructor) 272623a7
  ok
* gen_retry 1.2.0 (Hex package) (mix)
  vmiller@example.com (gen_retry) 6ac4411c
  ok
* combine 0.10.0 (Hex package) (mix)
  vmiller@example.com (combine) eff8224e
  ok
* certifi 2.5.1 (Hex package) (rebar3)
  vmiller@example.com (certifi) 867ce347
  ok
* hackney 1.15.2 (Hex package) (rebar3)
  vmiller@example.com (hackney) 07e33c79
  ok
* tzdata 1.0.2 (Hex package) (mix)
  vmiller@example.com (tzdata) 6c4242c9
  ok
* timex 3.6.1 (Hex package) (mix)
  vmiller@example.com (timex) efdf56d0
  ok
* db_connection 2.2.2 (Hex package) (mix)
  vmiller@example.com (db_connection) 3bbca41b
  ok
* ecto 3.0.9 (Hex package) (mix)
  vmiller@example.com (ecto) f01922a0
  ok
* crontab 1.1.5 (Hex package) (mix)
  vmiller@example.com (crontab) 2c943950
  ok
* phoenix_pubsub 1.1.1 (Hex package) (mix)
  vmiller@example.com (phoenix_pubsub) 6668d787
  ok
* oauth2 0.9.4 (Hex package) (mix)
  vmiller@example.com (oauth2) 632e8e88
  ok
* cowlib 2.7.0 (Hex package) (rebar3)
  vmiller@example.com (cowlib) 3ef16e77
  ok
* cowboy 2.6.1 (Hex package) (rebar3)
  vmiller@example.com (cowboy) f2e06f75
  ok
* mime 1.3.1 (Hex package) (mix)
  vmiller@example.com (mime) 30ce04ab
  ok
* libring 1.4.0 (Hex package) (mix)
  vmiller@example.com (libring) 41246ba2
  ok
* swarm 3.4.0 (Hex package) (mix)
  vmiller@example.com (swarm) 64f8b300
  ok
* quantum 2.3.4 (Hex package) (mix)
  vmiller@example.com (quantum) 72a0e885
  ok
* postgrex 0.15.3 (Hex package) (mix)
  vmiller@example.com (postgrex) 5806baa8
  ok
* ecto_sql (Hex package) (mix)
  vmiller@example.com (ecto_sql) 3d842665
  the dependency build is outdated, please run "mix deps.compile"
* mariaex (Hex package) (mix)
  vmiller@example.com (mariaex) 83266fec
  the dependency build is outdated, please run "mix deps.compile"
* ecto_enum (Hex package) (mix)
  vmiller@example.com (ecto_enum) d44fe2ce
  the dependency build is outdated, please run "mix deps.compile"
* distillery 1.5.5 (Hex package) (mix)
  vmiller@example.com (distillery) c6132d5c
  ok
* joken (Hex package) (mix)
  vmiller@example.com (joken) ff10fca1
  the dependency build is outdated, please run "mix deps.compile"
* plug_crypto 1.0.0 (Hex package) (mix)
  vmiller@example.com (plug_crypto) 18e49317
  ok
* plug 1.7.1 (Hex package) (mix)
  vmiller@example.com (plug) 8516d565
  ok
* plug_cowboy 2.0.1 (Hex package) (mix)
  vmiller@example.com (plug_cowboy) d798f8ee
  ok
* phoenix (Hex package) (mix)
  vmiller@example.com (phoenix) 56fe9a80
  the dependency build is outdated, please run "mix deps.compile"
* new_relic_agent (Hex package) (mix)
  vmiller@example.com (new_relic_agent) 008a074a
  the dependency build is outdated, please run "mix deps.compile"
* new_relic_phoenix (Hex package) (mix)
  vmiller@example.com (new_relic_phoenix) e5269f25
  the dependency build is outdated, please run "mix deps.compile"
* cors_plug 2.0.0 (Hex package) (mix)
  vmiller@example.com (cors_plug) 238ddb47
  ok
* phoenix_ecto (Hex package) (mix)
  vmiller@example.com (phoenix_ecto) c43117a1
  the dependency build is outdated, please run "mix deps.compile"

* Database adapter and version (mix deps):
* Operating system: Mac OS

### Current behavior
== Compilation error in file lib/ecto/adapters/postgres/connection.ex ==
** (CompileError) lib/ecto/adapters/postgres/connection.ex:309: Ecto.Query.WithExpr.__struct__/0 is undefined, cannot expand struct Ecto.Query.WithExpr
    (stdlib) lists.erl:1354: :lists.mapfoldl/3
    (stdlib) lists.erl:1355: :lists.mapfoldl/3
could not compile dependency :ecto_sql, "mix compile" failed. You can recompile this dependency with "mix deps.compile ecto_sql", update it with "mix deps.update ecto_sql" or clean it with "mix deps.clean ecto_sql"

### Expected behavior

Should have been able to compile.

I am getting this error after I updated the ecto_sql using mix deps.update ecto_sql from 3.0 to 3.4

 Comments: 
 Comment 0: Could you run `mix deps.compile --force ecto_sql`; does that help? If not, `rm -rf _build deps`.
 Comment 1: > Could you run `mix deps.compile --force ecto`; does that help? If not, `rm -rf _build deps`.

I tried both and it didn't worked.
 Comment 2: @sahilpaudel-pe there is something stale in your checkout. Try this:

1. Push the code with updated versions to a branch
2. Clone the repository in another directory
3. Now run `mix compile`

Are you running these commands from an editor or directly on the CLI?
 Comment 3: @josevalim 
I updated ecto_sql and pushed into a new branch
I clone a repository to new directory
I ran mix `mix deps.get` and then `mix compile`
But I am getting same error.
 Comment 4: @sahilpaudel-pe oh, I can see in your deps that you are using `ecto 3.0.9` still, even after the update instruction. Are you by any chance doing something like `{:ecto, "3.0.9", override: true}`? The `override: true` will bypass the dependency resolution behaviour and it can lead to bugs like this. Please double check and post the copy of your mix.exs if the issue still persists.
 Comment 5: Yes @josevalim There was override: true by fellow developer who worked on this project before me and I have no idea why it was like that.

Now, I removed the override and tried `mix deps.update ecto_sql`

It is throwing below message
`Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (version 3.0.0) requires ~> 3.0.0
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (version 3.0.1) requires ~> 3.0.2
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (version 3.0.2) requires ~> 3.0.3
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (version 3.0.3) requires ~> 3.0.4
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (versions 3.0.4 and 3.0.5) requires ~> 3.0.6
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (versions 3.2.0 to 3.2.2) requires ~> 3.2.0
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (versions 3.3.0 to 3.3.2) requires ~> 3.3
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (version 3.3.3) requires ~> 3.4 or ~> 3.3.2
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (version 3.3.4) requires ~> 3.4 or ~> 3.3.3
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto" (versions 3.1.0 to 3.1.7) because
  ecto_sql (versions 3.4.0 to 3.4.2) requires ~> 3.4.0
  phoenix_ecto (version 4.0.0) requires ~> 3.0
  mix.exs specifies ~> 3.1.0


Failed to use "ecto_sql" (versions 3.1.0 to 3.1.6) because
  new_relic_agent (version 1.17.1) requires ~> 3.3
  mix.exs specifies ~> 3.0`
 Comment 6: Yes, now you have to update those dependencies. My suggestion is to simply remove `{:ecto, ...}` from your mix.exs. And then doo `mix deps.update ecto ecto_sql` and keep on adding the dependencies to the update command until you have matching versions for everybody.
{'source': 'GithubIssues', 'repo_name_with_owner': 'elixir-ecto/ecto_sql', 'issue_id': 605302317, 'repo_stars': 423.0}