util: Add list_is_singular() helper function

Returns whether the list has exactly one element.

Reviewed-by: Matt Turner <mattst88@gmail.com>
1 file changed