Assign figure numbers automatically

--HG--
extra : histedit_source : 8981e8c29bba06a2270bfdcc134f11c33060a01b%2Ccfc5b0a59fa07965575f4788d2b4e5a4b042b7d7
Add config entries for numfig

--HG--
extra : histedit_source : ef67e69e60117d69bd2289e047cb28c73c103731
Ignore "self" and URL in toctree

--HG--
extra : histedit_source : 9455d38b8a112a3b72efd0e3ea71c648c8fd1210
Fix RuntimeError with numbered circular toctree

--HG--
extra : histedit_source : 8a32a3e4a652c349c4471e0b4b803e4107675374
Add testcases for numfig

--HG--
extra : histedit_source : e070e7221b7a7d9dc03933baa5ba27523bcfcba9
Assign fignum to tables and code-blocks

--HG--
extra : histedit_source : cc692f25d6b48adb487f889e83f5b0d10ccfe429%2C9804d0cf893c90da1feba2e345a18af4d779e0e4
Fix assign_figure_numbers() raises AttributeError with old environment

--HG--
extra : amend_source : 868a3d8da0f24c341636876d70b736f670ba4488
Make numfig_prefix translatable
Refactor has_child() function (by review)
Separate numfig testcase from toctree's

--HG--
rename : tests/roots/test-tocdepth/rimg.png => tests/roots/test-numfig/rimg.png