Sped up process_frame()

I sped up process_frame() by doing the following:
-- Find only the top 2 nearest matches with the feature_database (instead of computing all distances)
-- Precompute neighbors for selected_features if necessary

On some data that I'm working with I went from 41ms per frame (using the master) to 27ms per frame (using this fork).