Only update routes for instances that are running

If an update message is processed by a an instance that is not in the
proper state, a router registration message may get published with port
0 as the target port.  This is, obviously, unreachable. :)

This change will prevent updates to app instances that aren't in an
appropropriate state.  When app update messages are skipped because of
incorrect state, the app instance version remains at the old level so
the health manager can detect the problem and correct it.
Refactor instance uri update

Signed-off-by: Phan Le <ple@pivotallabs.com>