support linenos in listing and codeblock

Fix #1010 by adding compatibility with Sphinx's```:linenos:``` option.