Bug 835243 - add a confirm window to tell users rename again

  - refactor code, take the check part befoer getting deviceInfo
  - Remove some empty lines and check nameEntered is null case
Merge pull request #11979 from EragonJ/bug-835243

Bug 835243 -  [OPEN_][Bluetooth]Bluetooth device name can be unrestricted input and does not have limit, r=@crh0716