Autocomp: A Powerful and Portable Code Optimizer for Tensor Accelerators