Improve Waf support for Markdown plugin

Now the Discount library is checked first and used if available. The embedded markdown
library is used as fallback.