Fix some warnings and some refactoring

Other warnings I cannon fix yet and they can be ignored:

* "WARNING: duplicate label" This is because index files are duplicated
  between pdf and html sets. Excludes should fix it, but don't do
  it entirely. These indices should be refactored somehow.

* "WARNING: document isn't included in any toctree" Pdf build don't use
  single doctree and neigher excludes not :orphan: are not effective.

* "is too wide for the frame, rescaling" I don't know why would someone
  make this a warning. It's normal to rescale large images to fit the
  page width during the build process.

* "WARNING: undefined label" Cross references between pdf files obviously
  will not work. But will work inside a single html doctree.

I have also moves all index file includes into contents/ so both PDF and
HTML builds include same files and you only need to edit one index file
inside contents/ folder to make changes to both pdf and html.

Change-Id: Ia1a6e3e1f7026005702b06fd704822076d163997
Closes-Bug: 1310555