Added global variables $config:resource-mode and
$config:collection-mode.

References #511.