Basic framework for class mappings

Each node's classes are now pre-initialised depending on the
classes_mapping key in the config file, e.g.:

  class_mappings:
    '*': default
    /^local/:
      - local

This will cause all nodes to get the 'default' class before anything
else, and it will cause all nodes whose name start with "local" to get
assigned the 'local' class.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Migrate adapters to class_mappings API

Signed-off-by: martin f. krafft <madduck@madduck.net>
Handle nonexistent nodes if class_mappings matches

If a class_mapping matches, then there is no real need for the storage
backend to actually find a node record, so if it raises NodeNotFound, we
can gracefully catch this.

This could probably be made configurable, but it's do for now.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Disable implicit node creation

With mappings, the strict requirement for nodes to be defined, e.g.
with yaml_fs through existence of a file, is theoretically no longer
required to be strict.

Let's keep it for now, though, but export the behaviour to the function
signature of nodeinfo()

Signed-off-by: martin f. krafft <madduck@madduck.net>
Change to using a list of mappings to maintain order

Signed-off-by: martin f. krafft <madduck@madduck.net>
Do not attempt to iterate in the absence of mappings

Signed-off-by: martin f. krafft <madduck@madduck.net>
Document the class mappings features

Signed-off-by: martin f. krafft <madduck@madduck.net>
Place classes mapped onto nodes into __reclass__ key

Signed-off-by: martin f. krafft <madduck@madduck.net>
Enable interpolation/backreferences in regexp-class-mappings

Signed-off-by: martin f. krafft <madduck@madduck.net>
Add note about escaping slashes in regexp

Signed-off-by: martin f. krafft <madduck@madduck.net>
Document class mappings in changelog

Signed-off-by: martin f. krafft <madduck@madduck.net>
Escape asterisk in glob

Signed-off-by: martin f. krafft <madduck@madduck.net>
Add rebase warning to branch README

Signed-off-by: martin f. krafft <madduck@madduck.net>