[FIX] defaultParams in optionally secure UH
[REF] Properly use Flask routing and UHs for APIs

also move api/jsonrpc routes into a blueprint
[FIX]  OptionallySecureURLHandler behavior

it needs to create non-secure urls with secure=False, even if the
current request is using https
[FIX] Build absolute URLs in build_url()