Bug 937040 - Revise contacts app to adapt to WebIDL changes in a uniform way (r=jmcanterafonseca)

Didn't want to complicate things so I included a helper function per library instead of creating a centralized helper function and lazy loading it when needed.

I tried to test all the possible paths to check that everything works as expected.