Mock looping_call in metadata agent tests

Change-Id: Icb5146084730384bac1fb7d3176ce0cfcd565cc5
Closes-Bug: #1262089
Merge "Mock looping_call in metadata agent tests"