Revert pkg-query %a and %k back to an integer

Scripts such as portmaster and portupgrade expect an integer
here. This is also the advertised result in the manpage.