Overhaul USB HID for Leonardo and Micro

This pull request includes the features from pull request 1488 and pull request 1391. I've somewhat overhauled the code to better match the surrounding code and a few features.

I've also added code examples for the less discoverable features.

If this pull request isn't "right" yet, I'd love feedback so I can improve it.



On Wed, Dec 10, 2014 at 07:30:54AM -0800, Nico wrote:
> I dont understand this. You mean if we **had** an unlimited amount of keys? but we dont, so its useless?? The whole implementation relies on 6 keys. It also relies on USB. And the limit for USB is 64 bytes per bank. And for multireports its 63 bytes. And for u2 compatibility its 15 bytes. So it doesnt make sense at all to me. It just blows the flash.

The number of keys in a report has been abstracted to the point where it's now possible to change it. I've been working toward an implementation capable of true NKRO. (A full solution that's entirely spec-compliant will require separate descriptors for boot protocol and nkro.) But I've tested a trivial change to get to NKRO outside of boot mode and it works well on osx, linux and windows. I don't believe this is where we're blowing our flash budget. And again, the solution proposed by c.maglie would have us only using that flash if the user was actively using the feature
 
--