Add widgets shortcuts

Summary: Quick insert of widgets into the editor via keyboard shortcuts

How it works:
1. While writing the question/answer/hint, tap CTRL
2. You have now half a second to type the shortcut of a widget to quickly add it (for example: 'N' for the number line)
3. Press spacebar to immediately insert the widget, or just wait
4. Rinse & repeat

Thought this could be useful for someone who writes a lot of exercises :)

What has been done
* Added a onkeyUp handler to detect the CTRL key and to start the capturing of the shortcut
* Added a onkeyDown handler to capture the shortcut characters
* Added a method to Util for simulating events
* Extracted a shortcut of each widget based on its name, and displayed it on the widgets dropdown
* Added a info tip to notify the user of the shortcut feature
* Fixed a discrepancy between FF and Chrome with the margins of the <select>s in .perseus-editor-widgets-selectors
Typed shortcuts

Summary: The user can type directly in the textarea the widgets' shortcuts and they will be replaced on the fly by the widget placeholder. Also, widget insertion in mid-text!

What's been done:
* Added three new Util's methods for handling text manipulation and parsing
* Removed the onKeyUp handler
* Changed the onKeyDown handler to reflect the new solution
* Changed the addWidget method so that it can insert the widgets where the cursor is instead of just at the end of the content
Make shortcuts case-insensitive
Use React synthetic event / Ignore invalid shortcuts
Avoid usage of data- attribute

I've created a WidgetSelectOption React element that can be referenced by its shortcut (this.refs.widgetSelect[shortcut]) instead of relying on a data- attribute as I did before
Remove unnecessary shortcut prop
Trigger select's onChange via React
Fix shortcuts list

(This most probably just a temporary solution!)

There was a problem the way the shortcuts list was being built after the latest changes.

First of all it was build everytime the render() method was called, which wasn't really optimal.
Secondly, the code kept adding shortcuts in shortcuts.list for the 'Answer' and 'Hint' dropdowns (so you ended up with 'C', 'CA', and 'CAT' as shortcuts for 'Categorizer').

The way I fixed it is to use the shortcuts list as an instance variable of each WidgetSelect so that they don't conflict with one another.

This is obviously not optimal as the list should be only one, shared between the element instances. I tried to build the shortcut list as a 'global' variable but Widgets.getPublicWidgets() return only an empty array up at the beginning, so for now I wrote this solution as a baseline for future improvements.
Refactor and remove triggerShortcut()
Add TAB to the shortcut trigger keys
Add shortcut property to widgets

I made possible to explicitly assign a shortcut to a widget, by adding the 'shortcut' property in the widget's exported object (example included).

The property is not mandatory, so if you don't bother about giving a specific shortcut to a certain widget, one will still be assigned by extracting it from the widget's 'name' property. The 'shortcut' property will have the priority over the automatically generated ones anyway, so we avoid having them accidentally overwritten.
Merge remote-tracking branch 'upstream/master' into widgets-shortcuts

Conflicts:
	src/editor.jsx
Merge remote-tracking branch 'upstream/master' into widgets-shortcuts

Conflicts:
	src/editor.jsx
Merge remote-tracking branch 'upstream/master' into widgets-shortcuts

Conflicts:
	src/editor.jsx
	src/util.js
Merge pull request #12 from AkA84/widgets-shortcuts

Add widgets shortcuts