added lock mechanism to notifications list. to prevent reading and writing at the same time.

git-svn-id: http://notifications-widget.googlecode.com/svn/trunk@306 21922344-3934-ee51-d6e3-fd981ce84c01