Add implementation and tests for SCAN

Here's an implementation of the `SCAN` command with pattern matching and count limiting. Let me know if it looks good cause I'm not particularly into the prettiness of my tests )).