Feature/freeze subset recursively (rebase)

This is @benoitbryon's https://github.com/pypa/pip/pull/1946 rebased on to the latest `develop` branch @ 5addd1b7bf3f582ef8367aa0a875f95f08b5c921.