network-manager: move connection generation to a lib file
Move the connection generation code to a library file so that it can
be reused from other places.
(cherry picked from commit 6e1e87cd2567801b10b2b4f716436c48688408bf)
Resolves: #1847518
patch_name: 0087.patch
present_in_specfile: true
location_in_specfile: 87
squash_commits: true