HTML error in notmyidea: <li> not allowed in <section>.

<li> tags need to be inside of <ul> or <ol>.
Thanks to the w3c_validate plugin for finding this.
Fix stray </ol> and </section> if only one article is displayed.

We already check if loop.length > 1 before outputting <section> and <ol>
tags, but we neglected to do the same check when outputting the corresponding
end tags.

Also, since I had to read the code when I touched it, simplified a conditional:
if (a) if (a and (b or not b and c))
can be simplified to
if (a) if (b or c)

Note the "b or not b", it was just too ugly to not fix.
Some browsers like Lynx render adjacent links without implicit spaces.

Put an extra space at the end of each link to a tag so that Lynx doesnt render
the tags as a single word.
Merge pull request #1265 from mlang/valid-html

Fix notmyidea theme's HTML tags