A wavelet theory for local fields and related groups