Implement scanning

The way I solved the problem described in #2 was by making previous signals complete when the method is called again with different scan parameters. This was the approach that I found was the simplest without overcomplicating the API, but suggestions are welcome. Unit tests were added to make sure this works as expected.