Makefile: fix linking breakage due to misplaced LIBS variable
Started work on regex-based string replacement module.

This will work for easier definition of note content conversion.
Wrote regex_simplereplace(). It passes a simple test.
regex-replace.t.c: make it simpler to copy+paste the test
regex_simplereplace: fixed a segfault due to insufficient memory for ret

The ret variable was sometimes assigned more data than it could handle.

Now we check if the replacement is longer than the substitution, and
realloc() if this is the case.
regex-replace.c: make global_replace parameter actually work

regex_simplereplace() was always replacing globally because the loop was
not verifying if this was or not the first replacement. We are taking
leverage of the 'from' variable, that will be != 0 if this is the
second iteration of matches.
regex-replace.t.c: more tests to make sure case_insensitive is ok
regex-replace.c: renamed string_to_match_against to string_to_match_against
regex-replace.c: convert matchptr into an array

This will be needed to support regex substitution groups.
regex-replace.t.c: add test for parenthesis usage
Added support for subsittution backreferences.
Add support for custom -l library declarations for tests.

This is done via the testname_TEST_LIBS variable.

This commit was taken from caddeus-framework commit c41f3c99.

URL: https://github.com/alvarezp/caddeus-framework/commit/c41f3c997314c2afe61de768d121e0c243e0e7fe
Merge branch 'master' into regexrep
Started development of an homogeneous note filter (codec).

The 'filter' module will be driven by tests. This commit
sets the boilerplate for successful compilation.
Escape \n in input, expected and result strings in tests.
filter: Added simple <div> removal on decode.

Not sure this is what I want, though, but hey, it's a
good start.
regex_simplereplace(): Fix crash by bad allocation

Memory allocation was incorrect all over the place. Also there were =+
operators that were supposed to be +=. Those were fixed as well.

Also, added the test that triggered the crash and made sure the test
passed.
Merge branch 'regexrep' into filter-new
Added tests that actually look more like a real note.

Essentially, they should be converted to plain text.

Filter should detect <div> and convert them to line breaks.
filter: added test for a note with a <span> tag and made it pass