squash merge vanchi/Radar96-restore-subscriptions

Squashed commit of the following:

commit 5adabf8015be25f36434942fd5f9e46c6b1bc255
Author: Vanchi Koduvayur <vanchi@zendesk.com>
Date:   Mon Jul 8 13:13:24 2013 -0700

    make build

commit 7d3916c9a25460290cb2d67d9c2f2970fc8c10b1
Author: Vanchi Koduvayur <vanchi@zendesk.com>
Date:   Mon Jul 8 13:11:23 2013 -0700

    review changes

commit 6b1645a5afb631a18dee386584b5f8020f634c24
Author: Vanchi Koduvayur <vanchi@zendesk.com>
Date:   Sat Jul 6 07:05:46 2013 -0700

    reset restore on disconnect

commit 14a2b00d62cecbedf85beb923ff39cc25db1de4e
Author: Vanchi Koduvayur <vanchi@zendesk.com>
Date:   Sat Jul 6 06:58:19 2013 -0700

    make build

commit 4b4608056650a24615034cad933911ef35aea6e0
Author: Vanchi Koduvayur <vanchi@zendesk.com>
Date:   Fri Jul 5 16:39:38 2013 -0700

    tests

commit 5483b58f3d3475bda8e928f54e7e9293e8a7f930
Author: Vanchi Koduvayur <vanchi@zendesk.com>
Date:   Fri Jul 5 13:12:10 2013 -0700

    tests for memorize

commit fd2a95b0acb2187ffad5b3bf9cff35101d3ab5d3
Author: Vanchi Koduvayur <vanchi@zendesk.com>
Date:   Fri Jul 5 12:32:43 2013 -0700

    restore and memorize