save .fetch.json metadata

Creates a .fetch.json file when the plugin installation is completed.
Fills in the file with the correct metadata.

Signed-off-by: Gorkem Ercan <gorkem.ercan@gmail.com>
Save plugin installation records to config.xml

Saves the extra information for local and git plugin installations to
config.xml. Seperates the dependency installations from top level ones. 
Adds tests. 

Signed-off-by: Gorkem Ercan <gorkem.ercan@gmail.com>