Move back to 32 bit method IDs, add a bijective map for method IDs. Also some cleanup. (cherry picked from commit d40bcc4f) Bug: 19264997 Change-Id: Icdd36591df53ff975d30b9000cfe67d3ae8c51d5