Fix potential race condition when processing Portal basemaps.
Clean up.
Generalize logic for creating layer XML.
Support appending basemaps from Portal map-service items.
Merge branch '#113/support-appending-map-service-item-basemaps' into develop