[FLINK-386] Duplicate dependencies in lib folder

This set of changes cleans up/upgrades the dependencies of Flink and reduces the problem of duplicate libraries in the in lib folder as far as possible.