Added case when subscription timeout fires but the expiry in the DB was updated by another node(through a refresh), so we shouldn't terminate subscription.
Some small changes, code refactoring and beautification.


git-svn-id: https://svn.resiprocate.org/rep/resiprocate/branches/b-ezucerls-20131210@10890 ddefafc4-47db-0310-ae44-fa13212b10f2