Japan's transport authorities have given Mazda permission to road test a hydrogen-fuelled, rotary-engine version of its RX-8 sports car.