Adding serialization capability
Merge pull request #4 from oss/master

Adding serialization capability
add a filter parameter to nearest function

filter is an evaluation function that receives the node to evaluate and returns the result of the evaluation, true or false.