niti: add write_attribute as a unique entry point

Signed-off-by: Julien Pagès <julien.projet@gmail.com>
nitvm: clean the code and add some comments

Signed-off-by: Julien Pagès <julien.projet@gmail.com>
# This is a combination of 2 commits.
# The first commit's message is:

nitvm: use perfect hashing for atribute access

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

# The 2nd commit message will be skipped:

#	Fix previous commit
#
#	Signed-off-by: Julien Pagès <julien.projet@gmail.com>