Make a better detection of index limit in multidex.

- Intern annotation content sooner.
- Count declared methods separatly because it seems possible to have them
  generate more method ids than they account in the constant pool if their
  name and descriptor are the same as those of called methods.
- Take into account some possible ids that can be added during dex creation.
- Drop evaluation of type ids numbers because it was wrong, it's not simple
  to do better and it's nearly impossible to have type ids overflow before
  method ids.
Detection is still rough, only a max value is evaluated not the real value.

Bug 14633887

Change-Id: I2e3180662cb4b1c58bbc743b69270ffaa64f3106
9 files changed