Add support of reading WMTS Get Cap document

This commit fixe #2721. It still lacks the possibility to create layer from the GetCap document. It also lacks the reading of TMS limits.
I am really not familiar with google closure. If I understand well I must use something more like this:

    if (!goog.isDef(value) || !goog.isDef(value.get('identifier'))) {
    }

Is that right?