Fix loose deps

- hard pin dynamically inserted libraries
- fix deps loose mechanism so that:
 * short versioned libraries are scopped as the rest
 * additional restrictions (blacklists for eg) are ported over
Merge pull request #587 from docker/fix-deps

Fix loose deps