router: Support wildcard routes, up to 5 levels deep.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>