Assign the paragraph type to a variable

Hi guys!
Method `paragraph_type` is called too frequently, several times for each line, so I rebuilt it to be a variable, which is determined only once.

**P.S.** I'm working on indentations of HTML output, a lot of code has been reviewed. See my branch `list_indentation` for details. But some things are still to be done, and, currently, some code output is broken. I have updated example outputs, which are good enough. Because my code changes a lot, please, don't change your code before I finish the review. Guess, it's would be difficult to merge my branch otherwise. Now, my branch has the following advantages:
- At least three methods managing HTML tags were merged into one, which is nevertheless relatively simple and makes code clearer.
- Indentations look better, at least for examples that I have updated.
- Important: now two blank lines collapse all lists, which coincides with Emacs' Org-mode behavior.