issue BW-230 fixed
cleaned up!
   * Unique session per stream

      * Rails is now making a session with hoot suite uid and pid as selectors.
      * I have tried the way Stepan suggested and could make some progress.
      * I was stuck again as we still need pid to be passed in params. This is required as cookies and sessions are shared between tabs / iframes
      * Its now storing Uid and Pid into database along with the session data

   * Stream persistance

      * Every time an JSON api request is made rails now need the pid params to be passed without which it will fail to render the response.
      * This helps rails to keep track of streams and manage the session smoothly
      * project_id, brand_id and the filter_params are now stored in the database when user request the mentions api each time.
      * This value is stored in a javascript global variable when a new page is being rendered (same as we store the bw session id)

   * BW redirect url issue

      * This was a blocker initially and I could do a workaround by limiting the params just to pid.
      * I was believing that HS will throw an error if token, ts and Uis is missing in the params. however I found I am wrong.
      * BW is now returning the params properly if we pass only pid to it.

   * I have tweaked the app.js to pass pid as a parameter with the url.
added a condition to check the existance of  filter variables
 put pid in header for all api calls so that session is authenticated
 put pid in header for all api calls so that session is authenticated
Added pid header.
 modified the app docs page to authenticate using pid in url
Removed missing filter
HS pid now passed in headers.