Use warning module for context warning instead of invoking console.warn ...

Use warning module for context warning instead of invoking console.warn and monitorCodeUse directly.  Depends on internal change: https://phabricator.fb.com/D1695279

@sebmarkbage Is this what you had in mind?
Actually looks like this and two lines down are both over 80 chars – can you break them up? Sorry for the back and forth.