Separate emulator core into a library, add SFML frontend