Rework "enabled" implementation for FreeBSD.

When trying to perform enabled=yes followed by enabled=no
against FreeBSD the module would die with the following error:
TypeError: sub() takes at most 4 arguments (5 given)

The target FreeBSD client (8.2) is running python 2.6.6. It seems the
extra 'flags' argument was added to re.sub() in 2.7.

In fixing this issue I have attempted to create a general atomic method
for modifying a rc.conf file. Hopefully this will make it easier to add
other rc based platorms. The strip/split magic was inspired by the user
module.
Use shlex for rc.conf parsing.

This makes the line parsing a lot more robust (and easier to read).
Code supplied by @dhozac, thanks!

Remove re import because this is not used anywhere.
added ability to override jinja enviornment from first line of template Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
added test for template overrides Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
moved override matching string to variable changed test template to match Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
fixed bug for string size mismatch, now substring depends on size of match string Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
Merge pull request #1680 from eest/fix_fbsd_enable

Rework FreeBSD "enabled" code
Make variables local to the play

Fixes #1677.
Don't prompt for vars in extra-vars

Fixes #1622.
Template handlers late

This allows overriding variables in name, and removes templating from
parsing.
Throw an error if multiple actions have been specified
Tweak fireball docs for 0.9
Limit seperator docs.
Tweak docs
Document 'when' and tweak the code to be a little more comprehensive on what is false.
Document new types of plugins.
Have module formatter ignore more types of files.
Set LANG in module_common.py

Add constant DEFAULT_MODULE_LANG that defaults to C.  Can be set via
environment variable ANSIBLE_MODULE_LANG or configuration variable
module_lang.  Updated test-module to have same behavior.
ini_file: prohibit section name 'default'
allow update of default section
add blurb re template to create base file
Merge pull request #1689 from sfromm/issue1644

Set LANG in module_common.py