appview,knotserver: make ref optional in all xrpc endpoint
this is backwards compatible mostly. there are bugs in the old handlers
around refs that include url escaped characters, these have been
remedied with this patch.
Signed-off-by: oppiliappan <me@oppi.li>