Add support to automatically detect version based on Debian changelog file

Based on the original bash implementation created by Sven-Thorsten Dietrich <sven@brocade.com>.

Signed-off-by: Jan Blunck <jblunck@brocade.com>