FIX: keyboard not resigning when closing via buttons on control, updated to use new iOS 7 methods when available