Bug 1036788 - Stop using origins to identify apps

https://bugzilla.mozilla.org/show_bug.cgi?id=1036788
// match manifestURL at first
if (this._apps[id].manifestURL) {
  if (this._apps[id].manifestURL == manifestURL) {
    return this._apps[id];
  }
} else if (this._apps[id].origin == origin) {
  return this._apps[id];
}
return null;