Add functions-common from devstack

This changeset adds the functions-common library from the devstack
project.

As the file's header states: "The canonical copy of this file is
maintained in the DevStack repo. All modifications should be made there
and then sync'ed to other repos as required."

Partial-Bug: 1312764
Implements: blueprint openstack-training-labs
Change-Id: I726414adca545fc6d6e59cd900b6179a6233f096