allow reusing rospack instance in rosmsg api

@tfoote @wjwwood Please review.