cfgfilter: don't re-register options

If the underlying config object already has a given option registered
we shouldn't re-register it with the filter, but instead just treat
it like an imported option.

The use case here is unit tests which register options and set
overrides for them before passing the config object to the code which
registers the options with a filter wrapper.

Change-Id: I50791f1b47083626babb79ec29e503913f7edc2f
Mask passwords included without quotes at the ends of commands

The current password masking doesn't scrub passwords from commands
in the case where the password doesn't have quotes around it and
the password is the last string in the command.  This commit updates
one of the regular expressions to catch this case.

Adds tests to ensure passwords at the ends of commands are properly
sanitized.

Change-Id: Id57a0cb05cd76ef8c26def738305ade6b085aaa7
Closes-Bug: #1320028
Expand © and remove unnecessary encoding lines

The word "Copyright" alone is sufficient to claim copyright, the ©
symbol need not be present.[1] This allows us to expand the "©" symbol
into "(c)" to avoid introducing non-ASCII characters.

As per PEP 263, a Python file with non-ASCII characters must have a
line with "coding: <some-encoding>". Python files containing only
7-bit ASCII characters need no such line.[2]

This commit expands the non-ASCII Unicode copyright symbols and
removes the now unnecessary encoding lines.

[1]: http://www.copyright.gov/circs/circ03.pdf
[2]: http://legacy.python.org/dev/peps/pep-0263/

Change-Id: I2d7be303b515be0e3e891f041477c99cedcca1bb
Merge "Mask passwords included without quotes at the ends of commands"
Remove extra whitespace

Remove space after "." at end of string that is not needed at all.
The gating in openstack-manuals complains about it when generating
documentation.

Change-Id: I10f07acd752024bdefb84ce1768addebd087c00c
Merge "cfgfilter: don't re-register options"
Merge "Remove extra whitespace"
Merge "Expand © and remove unnecessary encoding lines"
Don't import fcntl on Windows

In 9b73c19b2e04e6db0dc70046e0ba5e5e22446996 the fcntl import was
mistakenly added to the general imports instead of the platform-
specific ones.  This fixes the problem so lockutils works on
Windows again.

Closes-Bug: #1335897

Change-Id: Iadcc6562faeacbe887c3dcafe06d54bd08caea07