General improvements to the plugin

- fix progress bar
- fix loop control
- fix title/duration for current playing module
- some code refactoring

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Fix elapsed time reported to host

Get progress time from the player engine instead of simply passing wall
clock time. Also add compensation for internal latency.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>