Fix selectedVersion reference bug

Setting library.selectedVersion = library.versions[0] creates an unwanted reference link that results in the [0] element getting overwritten once a new library.selectedVersion is selected. Using angular.copy prevents this unwanted reference.