Bug 874155 - [SMS] Encode the thread ID in the URL when in thread-edit m...

Encode the thread ID in the URL when in thread-edit mode and adjust the UI logic to account for it