remote: reorganize tests
refs: No component of a refname can end with '.lock'
remote: Introduce git_remote_is_valid_name()

Fix libgit2/libgit2sharp#318
Merge pull request #1324 from nulltoken/topic/remote_isvalidname

Topic/remote isvalidname