J&J Snack Foods saw its full-year earnings climb, boosted by growth in its foodservice division and "strong" sales of its pretzel products.