Fix duration, add new function for timestamp formatting

Now plugins can use 

    from util import hook, timeformat
    
    @hook.command
    def formattime(inp):
        return timeformat.timeformat(int(inp))

which will return `1:40`.