Add av_top() synonym for av_len()

av_len() is misleadingly named.
Convert core code to use av_top()