Add possiblity to use Astyle extension to format function
(probably will be removed/changed later)
Fix closing incative documents algorithm.
Make pinned documents not closed by auto-closing.