[DIAL] Make a copy of device id before erasing device from map.

erase() by key takes input param as a const ref. Invoking erase() by
key using data that will be destroyed during the erase() call will
result in undefined behavior.

BUG=656073

Review-Url: https://chromiumcodereview.appspot.com/2436403003
Cr-Commit-Position: refs/heads/master@{#426957}
1 file changed