Make sure 'everyone' knows about changes to the sharetab.

+ Instead of opening a temporary sharetab and then renaming it, just open it with freopen() writeable and write the info.
+ If sharetab isn't opened, open it with fopen() instead of freopen() to avoid segfault if it doesn't exist.
+ Don't open sharetab in parse_sharetab() - it's already open!
+ Reuse the handle, fseek to beginning and read...

This might help (somewhat!) with #821, #845 and #1484, but it is no way close enough to fix the issues completely. Most it can do is cut the amount of time used with a few minutes in total. But it's still a worthy enough pull request to consider (until such time we can remove or redesign/rewrite libshare completely).

This was part of my SMB rewrites patch (#1476), but it's better served as a separate pull request.

Signed-off-by: Turbo Fredriksson <turbo@bayour.com>