Query component instance by the given id

@inner
@param {Object} ctx the component context
@param {string} id the component reference id
@return {?Object}
function queryComponentInstance(ctx, id) {
    let isSelectAll = Array.isArray(id);
    isSelectAll && (id = id[0]);

    // query multiple components is not supported
    let key = id.substr(1);
    return ctx.$child(key);
}