Feature/add rmi random port

add
1. decouple router and bns registry.
2. add rmi random port env.