fixes search action, returns only active properties, adds tests for sear...

fixes search action, returns only active properties, adds tests for search action and property model's method #available_between. This is a rebase of a former pull request of a branch, search_function, which should either be deleted or ignored.