[counters] Add sample and accessors functions
[counters] Sample should fail if buffer size is too small
[counters] Use macro to copy counter in sampling, and use sizeof directly instead of mono_counter_get_size

The use of sizeof will enable compilers optimization on memcpy.
[counters] Fix type issue on mini counters

Used MONO_COUNTER_WORD for gint32 variable, crashed on 64bits platform.
[counters] Disable register filter on valid_mask

This was previously used to not store counters that were not going to be dumped, but because we can now sample them, we have to make sure that they are stored, even if we do not plan to dump or sample them.
Merge pull request #992 from ludovic-henry/ludovic-counters-pr1

[counters] Add sample and accessors to mono counters API