Fixed issues with unproper processing of tag files

Hi,
 Here is fix for several issues.

Issue 1: Clean several tags with Zend_Cache::CLEANING_MODE_MATCHING_TAG flag.
Steps to reproduce:
 1. Create cache with id=id1 and tags=tag1,tag2
 2. Create cache with id=id2 and tags=tag1,tag3
 3. Clean cache with .clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array(tag1, tag_not_existed))
Actual result:
  Cache with id1 and id2 are still presented and cache tag files tag1 is removed.

Issue 2: Tag file randomly not appended with ids related to it.
 Steps to reproduce:
 1. Remove call to rand() function on cleaning.
Actual result: tag file would never be populated with newly created ids.