Merge pull request #8 from leafo/master

Don't count repeated keys in nrkeys
added .pyc files to gitignore list
Sniffing events in os x through the Cocoa api

Now we can log in OS X as well. Still have to connect it to the rest of
the program. Will only print to stdout right now.
Removed unneeded code.
Made a Display

Made a display class to comply with how selfspy behaves.
Also imported NSKeyDown.
Updated imports, added geometry and other things to focus, fixed handler

Moved NSApplicaiton and NSApp to be imported from AppKit
Added Geometry and some other things to Focus, it is needed to get
things to work together with how selfspy works. Right now everything is
hardcoded.
Do not need app var, but need the NSApplication.sharedApplication() to
be called.

Handler now sends things to hooks as it is supposed to

added what to do if called.. for test purposes
moved out of daemon

CoreFoundations do not work after forked:

The process has forked and you cannot use this CoreFoundation
functionality safely. You MUST exec().
Break on
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTION
ALITY___YOU_MUST_EXEC__() to debug.
import of os x library

checks for os x platform, if os x import sniff_cocoa else do xlib
things. Removed explicit tests for Xlib errors. I think these should be
handled somewhere else.
Added logging of window and process name
Added a .gitignore for the pyc files
Whitespace wrangling
Added --change-password functionality

When run, it will prompt for 2 passwords: the first decrypts the
keyboard input, and then reencrypts it with the new password.
The utility requires a lock on the database, so it requires selfspy
to not be running while it changes the passwords. Also, it does not
run the logger after automatically, because being explicit is
better.
Changed prints to p3k style
Finished suggestion for how activity receives and stores things
oops. didn't mean to change that
Fix bug, moved init session to run
OS X:added modifier support, window size support
Adde comment to remind to check for display changes
Now logs the active app correctly.
Fixed bugs preventing compile/run