GCP-8728
Fix the rename to now show error when we are basically applyign the same name
Move some js variable to globals.html
move some js functions to fieldbook-common.js

Reviewer: Tiffany Go

Issues: none