Lock username

Lock the username if juju version is less than 1.21.
Because we follow semver it's possible to have 3 markers and an extension x.x.x-foo so the current implementation could fail. We should probably make this more robust:

- count the number of markers
- if it's three then drop the last one 
- parse-float the remaining value.