Exploring Training and Inference Scaling Laws in Generative Retrieval