converted library to gen_server

This allows to store neo4j_url in state.