Share autocompletion service

The autocompletion code was duplicated in nativescript-cli and appbuilder-cli. This PR extracts the duplicated code in common lib.