Cherry-pick "Refactor Regexp.prototype" am: 780b5e3420 am: fd88a6d57e am: 40be1f0a48 am: 8419031c72 am: 3157132735 am: 96c75dc8d8 am: e8640cee53 am: 4a6e76ef76 am: bc951f390e

Change-Id: Iba55f52f64f8abe4c563a54106dc898ee4876c58