Bug 918970 - display existing thread when sending a sms from contact app

Maybe we can move these inline functions into separate methods? They look like atomic enough, I just quickly throw here what I have in mind, but you don't have to follow it, just choose what way is better in you opinion :)
```
_findThreadIdByNumber: function(number) {
  var threadId = null;

  function checkCandidate(message) {
    // As in the comment above....
  }

  ......

  MessageManager.getMessages({
    .......,
    done: function() {
      if (threadId) {
        deferred.resolve(threadId);
      } else {
        deferred.reject();
      }
    }
  });
  ......
},

_findContactByNumber: function(number) {
    // Here we don't need to verify threadId, as this method is called only if thread is not found
    // So just call resolve in find contact callback
    .....
    deferred.resolve(contact || null);
    .....
},
```
In this case these methods don't have redundant knowledge about some ```viewInfo``` that they don't use.

Then we can build more reasonable logic chain, like look for contact only if thread Id search failed (```catch``` method is called):

```
var number = activity.source.data.number;
var threadIdOrContacPromise = this._findThreadIdByNumber(number).catch(function() {
  return this._findContactByNumber(number);
});
```
But don't have good idea for the last branch, maybe something like this?

```
threadIdOrContacPromise.then(function(threadIdOrContact) {
  var viewParams = {
    body: activity.source.data.body,
    number: number
  };

  if (Number.isInteger(threadIdOrContact)) {
    viewParams.threadId = threadIdOrContact;
  } else if (threadIdOrContact) {
    viewParams.contact = threadIdOrContact;
  }

  this.toView(viewParams);
}.bind(this))
```
Or maybe I'm missing something :) Elaborate