Implemented stack-based algorithm for matching emphasis

C implementation updated to resolve #51 and #147.

Please note that I did not have access to environment to compile and run tests (I'm on Windows and Visual Studio). I did read the code three times so it *should* work. The algorithm was originally written for my C# implementation and it passes all tests from the latest spec.txt.